mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-13 08:35:45 -04:00
Improved Subscribe Button look and feel
* Improved Subscribe Button look and feel with stylsheet * Removed icons from Subscribe button * Subcribe button hided on posted too when subscribed
This commit is contained in:
parent
6750e6140f
commit
6c0c42c8ad
5 changed files with 61 additions and 27 deletions
|
@ -68,6 +68,10 @@ PostedListWidget::PostedListWidget(const RsGxsGroupId &postedId, QWidget *parent
|
||||||
|
|
||||||
connect(ui->submitPostButton, SIGNAL(clicked()), this, SLOT(newPost()));
|
connect(ui->submitPostButton, SIGNAL(clicked()), this, SLOT(newPost()));
|
||||||
|
|
||||||
|
ui->subscribeToolButton->setToolTip(tr( "<p>Subscribing to the links will gather \
|
||||||
|
available posts from your subscribed friends, and make the \
|
||||||
|
links visible to all other friends.</p><p>Afterwards you can unsubscribe from the context menu of the links list at left.</p>"));
|
||||||
|
|
||||||
/* load settings */
|
/* load settings */
|
||||||
processSettings(true);
|
processSettings(true);
|
||||||
|
|
||||||
|
@ -288,6 +292,7 @@ void PostedListWidget::insertPostedDetails(const RsPostedGroup &group)
|
||||||
{
|
{
|
||||||
mStateHelper->setWidgetEnabled(ui->submitPostButton, IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags));
|
mStateHelper->setWidgetEnabled(ui->submitPostButton, IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags));
|
||||||
ui->subscribeToolButton->setSubscribed(IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags));
|
ui->subscribeToolButton->setSubscribed(IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags));
|
||||||
|
ui->subscribeToolButton->setHidden(IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags)) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************** **** **** **** ***********************/
|
/*********************** **** **** **** ***********************/
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>0</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="SubscribeToolButton" name="subscribeToolButton">
|
<widget class="SubscribeToolButton" name="subscribeToolButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -65,14 +65,18 @@
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<weight>50</weight>
|
<weight>50</weight>
|
||||||
|
<italic>false</italic>
|
||||||
<bold>false</bold>
|
<bold>false</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">Subscribe</string>
|
<string notr="true">Subscribe</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -116,9 +120,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="comboBox">
|
<widget class="QComboBox" name="comboBox">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">font: bold;
|
<string notr="true"/>
|
||||||
font-size: 15px;
|
|
||||||
color: #0099cc;</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
|
|
@ -64,7 +64,7 @@ void SubscribeToolButton::updateUi()
|
||||||
#else
|
#else
|
||||||
setPopupMode(QToolButton::InstantPopup);
|
setPopupMode(QToolButton::InstantPopup);
|
||||||
#endif
|
#endif
|
||||||
setIcon(QIcon(":/images/accepted16.png"));
|
//setIcon(QIcon(":/images/accepted16.png"));
|
||||||
setText(tr("Subscribed"));
|
setText(tr("Subscribed"));
|
||||||
|
|
||||||
if(mMenu != NULL) // that's because setMenu does not give away memory ownership
|
if(mMenu != NULL) // that's because setMenu does not give away memory ownership
|
||||||
|
@ -86,7 +86,7 @@ void SubscribeToolButton::updateUi()
|
||||||
} else {
|
} else {
|
||||||
setPopupMode(QToolButton::DelayedPopup);
|
setPopupMode(QToolButton::DelayedPopup);
|
||||||
setMenu(NULL);
|
setMenu(NULL);
|
||||||
setIcon(QIcon(":/images/RSS_004_32.png"));
|
//setIcon(QIcon(":/images/RSS_004_32.png"));
|
||||||
setText(tr("Subscribe"));
|
setText(tr("Subscribe"));
|
||||||
|
|
||||||
#ifndef USE_MENUBUTTONPOPUP
|
#ifndef USE_MENUBUTTONPOPUP
|
||||||
|
|
|
@ -6,14 +6,17 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1217</width>
|
<width>800</width>
|
||||||
<height>721</height>
|
<height>600</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="GxsForumThreadWidgetVLayout">
|
<layout class="QVBoxLayout" name="GxsForumThreadWidgetVLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -33,6 +36,9 @@
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="topWidget">
|
<widget class="QWidget" name="topWidget">
|
||||||
<layout class="QVBoxLayout" name="topVLayout">
|
<layout class="QVBoxLayout" name="topVLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="toolBarFrame">
|
<widget class="QFrame" name="toolBarFrame">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
|
@ -94,7 +100,7 @@
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>24</width>
|
<width>24</width>
|
||||||
<height>16</height>
|
<height>24</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolButtonStyle">
|
<property name="toolButtonStyle">
|
||||||
|
@ -476,6 +482,9 @@
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="bottomWidget">
|
<widget class="QWidget" name="bottomWidget">
|
||||||
<layout class="QVBoxLayout" name="bottomVLayout">
|
<layout class="QVBoxLayout" name="bottomVLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="RSImageBlockWidget" name="imageBlockWidget" native="true">
|
<widget class="RSImageBlockWidget" name="imageBlockWidget" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -515,6 +524,11 @@
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>SubscribeToolButton</class>
|
||||||
|
<extends>QToolButton</extends>
|
||||||
|
<header>gui/common/SubscribeToolButton.h</header>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>GxsIdLabel</class>
|
<class>GxsIdLabel</class>
|
||||||
<extends>QLabel</extends>
|
<extends>QLabel</extends>
|
||||||
|
@ -525,11 +539,6 @@
|
||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
<header location="global">gui/common/LineEditClear.h</header>
|
<header location="global">gui/common/LineEditClear.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>SubscribeToolButton</class>
|
|
||||||
<extends>QToolButton</extends>
|
|
||||||
<header>gui/common/SubscribeToolButton.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>RSTextBrowser</class>
|
<class>RSTextBrowser</class>
|
||||||
<extends>QTextBrowser</extends>
|
<extends>QTextBrowser</extends>
|
||||||
|
|
|
@ -119,18 +119,9 @@ GxsCreateCommentDialog QFrame#frame {
|
||||||
|
|
||||||
/* Forums */
|
/* Forums */
|
||||||
|
|
||||||
ForumsDialog QLabel#forumName, ForumsDialog QLabel#threadTitle
|
GxsForumThreadWidget QLabel#forumName
|
||||||
{
|
{
|
||||||
border: 2px solid #CCCCCC;
|
font: bold;
|
||||||
border-radius:6px;
|
|
||||||
background: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
ForumsDialog2 QLabel#forumName, ForumsDialog2 QLabel#threadTitle
|
|
||||||
{
|
|
||||||
border: 2px solid #CCCCCC;
|
|
||||||
border-radius:6px;
|
|
||||||
background: white;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CreateForumMsg > QToolBar#toolBar, CreateForumV2Msg > QToolBar#toolBar {
|
CreateForumMsg > QToolBar#toolBar, CreateForumV2Msg > QToolBar#toolBar {
|
||||||
|
@ -822,3 +813,30 @@ PostedListWidget QToolButton#submitPostButton {
|
||||||
font: bold;
|
font: bold;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PostedListWidget QToolButton#subscribeToolButton {
|
||||||
|
font: bold;
|
||||||
|
font-size: 15px;
|
||||||
|
color: white;
|
||||||
|
background: #0099cc;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
PostedListWidget QToolButton#subscribeToolButton:hover {
|
||||||
|
background: #03b1f3;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
GxsForumThreadWidget QToolButton#subscribeToolButton {
|
||||||
|
font: bold;
|
||||||
|
font-size: 14px;
|
||||||
|
color: white;
|
||||||
|
background: #0099cc;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
GxsForumThreadWidget QToolButton#subscribeToolButton:hover {
|
||||||
|
background: #03b1f3;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue