From 1400d91ef6f897983c65f8cf3085adb90f188aa3 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Tue, 18 Apr 2023 07:50:44 +0200 Subject: [PATCH] Use ElidedLabel for title in BoardsPostDisplayWidget --- retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.cpp | 4 ++-- retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.h | 7 ++++--- .../src/gui/Posted/BoardPostDisplayWidget_card.ui | 8 +++++++- .../src/gui/Posted/BoardPostDisplayWidget_compact.ui | 8 +++++++- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.cpp b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.cpp index 8209b5d1b..d0a09b7e2 100644 --- a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.cpp +++ b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.cpp @@ -400,7 +400,7 @@ QLabel *BoardPostDisplayWidget_compact::newLabel() { return ui->ne QToolButton *BoardPostDisplayWidget_compact::readButton() { return ui->readButton; } GxsIdLabel *BoardPostDisplayWidget_compact::fromLabel() { return ui->fromLabel; } QLabel *BoardPostDisplayWidget_compact::dateLabel() { return ui->dateLabel; } -QLabel *BoardPostDisplayWidget_compact::titleLabel() { return ui->titleLabel; } +ElidedLabel *BoardPostDisplayWidget_compact::titleLabel() { return ui->titleLabel; } QLabel *BoardPostDisplayWidget_compact::scoreLabel() { return ui->scoreLabel; } QLabel *BoardPostDisplayWidget_compact::notes() { return ui->notes; } QToolButton *BoardPostDisplayWidget_compact::shareButton() { return ui->shareButton; } @@ -469,7 +469,7 @@ QLabel *BoardPostDisplayWidget_card::newLabel() { return ui->newLa QToolButton *BoardPostDisplayWidget_card::readButton() { return ui->readButton; } GxsIdLabel *BoardPostDisplayWidget_card::fromLabel() { return ui->fromLabel; } QLabel *BoardPostDisplayWidget_card::dateLabel() { return ui->dateLabel; } -QLabel *BoardPostDisplayWidget_card::titleLabel() { return ui->titleLabel; } +ElidedLabel *BoardPostDisplayWidget_card::titleLabel() { return ui->titleLabel; } QLabel *BoardPostDisplayWidget_card::scoreLabel() { return ui->scoreLabel; } QLabel *BoardPostDisplayWidget_card::notes() { return ui->notes; } QToolButton *BoardPostDisplayWidget_card::shareButton() { return ui->shareButton; } diff --git a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.h b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.h index 189f83ae5..27d4a33aa 100644 --- a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.h +++ b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.h @@ -37,6 +37,7 @@ class QToolButton; class QTextEdit; class ClickableLabel; class GxsIdLabel; +class ElidedLabel; struct RsPostedPost; @@ -72,7 +73,7 @@ protected: virtual QToolButton *commentButton() =0; virtual QToolButton *voteDownButton() =0; virtual QLabel *newLabel() =0; - virtual QLabel *titleLabel()=0; + virtual ElidedLabel *titleLabel()=0; virtual GxsIdLabel *fromLabel()=0; virtual QLabel *dateLabel()=0; virtual QLabel *scoreLabel() =0; @@ -123,7 +124,7 @@ public: QLabel *newLabel() override; GxsIdLabel *fromLabel() override; QLabel *dateLabel() override; - QLabel *titleLabel() override; + ElidedLabel *titleLabel() override; QLabel *scoreLabel() override; QLabel *notes() override; QLabel *pictureLabel() override; @@ -162,7 +163,7 @@ public: QLabel *newLabel() override; GxsIdLabel *fromLabel() override; QLabel *dateLabel() override; - QLabel *titleLabel() override; + ElidedLabel *titleLabel() override; QLabel *scoreLabel() override; QLabel *notes() override; QToolButton *readButton() override; diff --git a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget_card.ui b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget_card.ui index 85eb14906..553577fb8 100644 --- a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget_card.ui +++ b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget_card.ui @@ -305,7 +305,7 @@ - + 0 @@ -464,6 +464,12 @@ + + ElidedLabel + QLabel +
gui/common/ElidedLabel.h
+ 1 +
GxsIdLabel QLabel diff --git a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget_compact.ui b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget_compact.ui index 8c6e89748..5e920cfed 100644 --- a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget_compact.ui +++ b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget_compact.ui @@ -211,7 +211,7 @@ 3 - + 0 @@ -515,6 +515,12 @@ + + ElidedLabel + QLabel +
gui/common/ElidedLabel.h
+ 1 +
GxsIdLabel QLabel