mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-29 01:16:20 -05:00
added system to clamp the text in thumbnails
This commit is contained in:
parent
262d36cc82
commit
9e20c04e3f
@ -98,7 +98,7 @@ public:
|
||||
lb->setFixedSize(W,H);
|
||||
lb->setPixmap(thumbnail);
|
||||
|
||||
lt->setText(msg);
|
||||
setText(msg);
|
||||
|
||||
QFont font = lt->font();
|
||||
|
||||
@ -116,7 +116,16 @@ public:
|
||||
}
|
||||
|
||||
void setPixmap(const QPixmap& p) { lb->setPixmap(p); }
|
||||
void setText(const QString& s) { lt->setText(s); }
|
||||
void setText(const QString& s)
|
||||
{
|
||||
QString ss;
|
||||
if(s.length() > 30)
|
||||
ss = s.left(30)+"...";
|
||||
else
|
||||
ss =s;
|
||||
|
||||
lt->setText(ss);
|
||||
}
|
||||
|
||||
private:
|
||||
QLabel *lb;
|
||||
|
@ -262,7 +262,7 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
|
||||
ui->postTime_LB->hide();
|
||||
ui->postLogo_LB->hide();
|
||||
|
||||
ui->postDetails_TE->setPlaceholderText(tr("No post selected"));
|
||||
ui->postDetails_TE->setPlaceholderText(tr("No text to display"));
|
||||
|
||||
// Set initial size of the splitter
|
||||
ui->splitter->setStretchFactor(0, 1);
|
||||
|
@ -161,7 +161,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="channel_TW">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
@ -526,7 +526,7 @@ p, li { white-space: pre-wrap; }
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_5">
|
||||
<attribute name="title">
|
||||
<string>Files</string>
|
||||
<string>All files</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
|
Loading…
Reference in New Issue
Block a user