mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-13 13:31:26 -05:00
Merge pull request #2262 from PhenomRetroShare/Fix_UseElidedLabelForForumName
Fix Use ElidedLabel for Forum Name
This commit is contained in:
commit
47c95b8bd1
@ -256,6 +256,7 @@ void ElidedLabel::mousePressEvent(QMouseEvent *ev)
|
|||||||
return; // eat event
|
return; // eat event
|
||||||
}
|
}
|
||||||
QLabel::mousePressEvent(ev);
|
QLabel::mousePressEvent(ev);
|
||||||
|
emit clicked(ev->pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ElidedLabel::setTextColor(const QColor &color)
|
void ElidedLabel::setTextColor(const QColor &color)
|
||||||
|
@ -38,7 +38,7 @@ class ElidedLabel : public QLabel
|
|||||||
Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor)
|
Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ElidedLabel(const QString &text, QWidget *parent = 0);
|
explicit ElidedLabel(const QString &text, QWidget *parent = 0);
|
||||||
ElidedLabel(QWidget *parent = 0);
|
ElidedLabel(QWidget *parent = 0);
|
||||||
|
|
||||||
const QString & text() const { return mContent; }
|
const QString & text() const { return mContent; }
|
||||||
@ -77,6 +77,7 @@ protected:
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
void elisionChanged(bool elided);
|
void elisionChanged(bool elided);
|
||||||
|
void clicked(QPoint pos);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool mElided;
|
bool mElided;
|
||||||
|
@ -274,7 +274,7 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget
|
|||||||
connect(ui->versions_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(changedVersion()));
|
connect(ui->versions_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(changedVersion()));
|
||||||
connect(ui->threadTreeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(threadListCustomPopupMenu(QPoint)));
|
connect(ui->threadTreeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(threadListCustomPopupMenu(QPoint)));
|
||||||
connect(ui->postText, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuTextBrowser(QPoint)));
|
connect(ui->postText, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuTextBrowser(QPoint)));
|
||||||
connect(ui->forumName, SIGNAL(clicked()), this, SLOT(showForumInfo()));
|
connect(ui->forumName, SIGNAL(clicked(QPoint)), this, SLOT(showForumInfo()));
|
||||||
|
|
||||||
ui->subscribeToolButton->hide() ;
|
ui->subscribeToolButton->hide() ;
|
||||||
connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool)));
|
connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool)));
|
||||||
|
@ -112,15 +112,18 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="forumName">
|
<widget class="StyledElidedLabel" name="forumName">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>Click here to clear current selected thread and display more information about this forum.</p></body></html></string>
|
<string><html><head/><body><p>Click here to clear current selected thread and display more information about this forum.</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>PushButton</string>
|
<string>Forum Name</string>
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -130,11 +133,11 @@
|
|||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType">
|
<property name="sizeType">
|
||||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>1</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -527,6 +530,11 @@
|
|||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
<header>gui/common/LineEditClear.h</header>
|
<header>gui/common/LineEditClear.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>StyledElidedLabel</class>
|
||||||
|
<extends>QLabel</extends>
|
||||||
|
<header>gui/common/StyledElidedLabel.h</header>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>SubscribeToolButton</class>
|
<class>SubscribeToolButton</class>
|
||||||
<extends>QToolButton</extends>
|
<extends>QToolButton</extends>
|
||||||
@ -545,8 +553,8 @@
|
|||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images.qrc"/>
|
|
||||||
<include location="../icons.qrc"/>
|
<include location="../icons.qrc"/>
|
||||||
|
<include location="../images.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -149,6 +149,14 @@ ForumsDialog, GxsForumThreadWidget
|
|||||||
qproperty-backgroundColorFiltered: rgb(255, 240, 210);
|
qproperty-backgroundColorFiltered: rgb(255, 240, 210);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GxsForumThreadWidget StyledElidedLabel#forumName
|
||||||
|
{
|
||||||
|
padding: 2px;
|
||||||
|
font: bold;
|
||||||
|
font-size: 15px;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
GroupTreeWidget
|
GroupTreeWidget
|
||||||
{
|
{
|
||||||
qproperty-textColorCategory: rgb(79, 79, 79);
|
qproperty-textColorCategory: rgb(79, 79, 79);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user