mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-23 13:51:12 -05:00
improving readability of channel list view items
This commit is contained in:
parent
695706cfae
commit
5fe37e013a
@ -204,17 +204,28 @@ void ChannelPostDelegate::paint(QPainter * painter, const QStyleOptionViewItem &
|
||||
font.setBold(true);
|
||||
painter->setFont(font);
|
||||
}
|
||||
painter->drawText(QPoint(p.x()+0.5*font_height,y),QString::fromUtf8(post.mMeta.mMsgName.c_str()));
|
||||
y += font_height;
|
||||
|
||||
painter->drawText(QPoint(p.x()+0.5*font_height,y),QDateTime::fromSecsSinceEpoch(post.mMeta.mPublishTs).toString(Qt::DefaultLocaleShortDate));
|
||||
{
|
||||
painter->save();
|
||||
|
||||
QFont font(painter->font());
|
||||
font.setUnderline(true);
|
||||
painter->setFont(font);
|
||||
painter->drawText(QPoint(p.x()+0.5*font_height,y),QString::fromUtf8(post.mMeta.mMsgName.c_str()));
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
y += font_height;
|
||||
y += font_height/2.0;
|
||||
|
||||
QString info_text = QDateTime::fromSecsSinceEpoch(post.mMeta.mPublishTs).toString(Qt::DefaultLocaleShortDate);
|
||||
|
||||
if(post.mCount > 0)
|
||||
{
|
||||
painter->drawText(QPoint(p.x()+0.5*font_height,y),QString::number(post.mCount)+ " " +((post.mCount>1)?tr("files"):tr("file")) + " (" + misc::friendlyUnit(qulonglong(post.mSize)) + ")" );
|
||||
y += font_height;
|
||||
}
|
||||
info_text += ", " + QString::number(post.mCount)+ " " +((post.mCount>1)?tr("files"):tr("file")) + " (" + misc::friendlyUnit(qulonglong(post.mSize)) + ")" ;
|
||||
|
||||
painter->drawText(QPoint(p.x()+0.5*font_height,y),info_text);
|
||||
y += font_height;
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
|
@ -482,6 +482,12 @@ p, li { white-space: pre-wrap; }
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="postName_LB">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
|
Loading…
Reference in New Issue
Block a user