removed useless line in boards showing url and moved url to title tooltip

This commit is contained in:
csoler 2020-10-17 13:38:22 +02:00
parent 5fe37e013a
commit 190857fd5a
4 changed files with 5 additions and 48 deletions

View File

@ -161,7 +161,6 @@ void BoardPostDisplayWidgetBase::setup()
titleLabel()->setText(tr("Loading"));
dateLabel()->clear();
fromLabel()->clear();
siteLabel()->clear();
QObject::connect(commentButton(), SIGNAL(toggled(bool)), this, SLOT(loadComments(bool)));
QObject::connect(voteUpButton(), SIGNAL(clicked()), this, SLOT(makeUpVote()));
@ -241,17 +240,12 @@ void BoardPostDisplayWidgetBase::setup()
urlstr += QString(" </span></a>");
QString siteurl = url.toEncoded();
sitestr = QString("<a href=\"%1\" ><span style=\" text-decoration: underline; color:#0079d3;\"> %2 </span></a>").arg(siteurl).arg(siteurl);
titleLabel()->setText(urlstr);
titleLabel()->setToolTip(siteurl);
}
else
titleLabel()->setText( QString::fromUtf8(mPost.mMeta.mMsgName.c_str()) );
if (urlarray.isEmpty())
siteLabel()->hide();
siteLabel()->setText(sitestr);
}
//QString score = "Hot" + QString::number(post.mHotScore);
@ -419,7 +413,6 @@ QToolButton *BoardPostDisplayWidget_compact::commentButton() { return ui->co
QToolButton *BoardPostDisplayWidget_compact::voteDownButton() { return ui->voteDownButton; }
QLabel *BoardPostDisplayWidget_compact::newLabel() { return ui->newLabel; }
QToolButton *BoardPostDisplayWidget_compact::readButton() { return ui->readButton; }
QLabel *BoardPostDisplayWidget_compact::siteLabel() { return ui->siteLabel; }
GxsIdLabel *BoardPostDisplayWidget_compact::fromLabel() { return ui->fromLabel; }
QLabel *BoardPostDisplayWidget_compact::dateLabel() { return ui->dateLabel; }
QLabel *BoardPostDisplayWidget_compact::titleLabel() { return ui->titleLabel; }
@ -499,7 +492,6 @@ QToolButton *BoardPostDisplayWidget_card::commentButton() { return ui->comme
QToolButton *BoardPostDisplayWidget_card::voteDownButton() { return ui->voteDownButton; }
QLabel *BoardPostDisplayWidget_card::newLabel() { return ui->newLabel; }
QToolButton *BoardPostDisplayWidget_card::readButton() { return ui->readButton; }
QLabel *BoardPostDisplayWidget_card::siteLabel() { return ui->siteLabel; }
GxsIdLabel *BoardPostDisplayWidget_card::fromLabel() { return ui->fromLabel; }
QLabel *BoardPostDisplayWidget_card::dateLabel() { return ui->dateLabel; }
QLabel *BoardPostDisplayWidget_card::titleLabel() { return ui->titleLabel; }

View File

@ -72,7 +72,6 @@ protected slots:
virtual QToolButton *voteDownButton() =0;
virtual QLabel *newLabel() =0;
virtual QLabel *titleLabel()=0;
virtual QLabel *siteLabel()=0;
virtual GxsIdLabel *fromLabel()=0;
virtual QLabel *dateLabel()=0;
virtual QLabel *scoreLabel() =0;
@ -120,7 +119,6 @@ public:
QToolButton *commentButton() override;
QToolButton *voteDownButton() override;
QLabel *newLabel() override;
QLabel *siteLabel() override;
GxsIdLabel *fromLabel() override;
QLabel *dateLabel() override;
QLabel *titleLabel() override;
@ -160,7 +158,6 @@ public:
QToolButton *commentButton() override;
QToolButton *voteDownButton() override;
QLabel *newLabel() override;
QLabel *siteLabel() override;
GxsIdLabel *fromLabel() override;
QLabel *dateLabel() override;
QLabel *titleLabel() override;

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>558</width>
<height>202</height>
<width>426</width>
<height>176</height>
</rect>
</property>
<property name="sizePolicy">
@ -327,22 +327,6 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="siteLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string notr="true">site</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="pictureLabelLayout">
<item>

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>540</width>
<height>172</height>
<width>542</width>
<height>150</height>
</rect>
</property>
<property name="sizePolicy">
@ -302,22 +302,6 @@
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="siteLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string notr="true">site</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>