mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-20 03:48:16 -04:00
added system to clamp the text in thumbnails
This commit is contained in:
parent
262d36cc82
commit
9e20c04e3f
3 changed files with 14 additions and 5 deletions
|
@ -98,7 +98,7 @@ public:
|
||||||
lb->setFixedSize(W,H);
|
lb->setFixedSize(W,H);
|
||||||
lb->setPixmap(thumbnail);
|
lb->setPixmap(thumbnail);
|
||||||
|
|
||||||
lt->setText(msg);
|
setText(msg);
|
||||||
|
|
||||||
QFont font = lt->font();
|
QFont font = lt->font();
|
||||||
|
|
||||||
|
@ -116,7 +116,16 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void setPixmap(const QPixmap& p) { lb->setPixmap(p); }
|
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:
|
private:
|
||||||
QLabel *lb;
|
QLabel *lb;
|
||||||
|
|
|
@ -262,7 +262,7 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
|
||||||
ui->postTime_LB->hide();
|
ui->postTime_LB->hide();
|
||||||
ui->postLogo_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
|
// Set initial size of the splitter
|
||||||
ui->splitter->setStretchFactor(0, 1);
|
ui->splitter->setStretchFactor(0, 1);
|
||||||
|
|
|
@ -161,7 +161,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="channel_TW">
|
<widget class="QTabWidget" name="channel_TW">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab_3">
|
<widget class="QWidget" name="tab_3">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -526,7 +526,7 @@ p, li { white-space: pre-wrap; }
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tab_5">
|
<widget class="QWidget" name="tab_5">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Files</string>
|
<string>All files</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
<item>
|
<item>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue