diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-10-07 16:32:46 +0300 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-10-07 16:32:46 +0300 |
commit | 184c8b28e94f1eb0bdf85581de1bf9a19d970f8a (patch) | |
tree | 9ecd21efb93d40299b87e76bb324dbdba4c25bd9 /src/RoomInfoListItem.cpp | |
parent | Use alignment instead of stretch (diff) | |
download | nheko-184c8b28e94f1eb0bdf85581de1bf9a19d970f8a.tar.xz |
Use a smaller font size for the timestamp
Diffstat (limited to 'src/RoomInfoListItem.cpp')
-rw-r--r-- | src/RoomInfoListItem.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/RoomInfoListItem.cpp b/src/RoomInfoListItem.cpp index 17880da1..ec9f8158 100644 --- a/src/RoomInfoListItem.cpp +++ b/src/RoomInfoListItem.cpp @@ -175,7 +175,9 @@ RoomInfoListItem::paintEvent(QPaintEvent *event) p.setFont(headingFont); p.setPen(titlePen); - const int msgStampWidth = QFontMetrics(QFont{}).width(lastMsgInfo_.timestamp) + 4; + QFont tsFont; + tsFont.setPointSizeF(tsFont.pointSizeF() * 0.9); + const int msgStampWidth = QFontMetrics(tsFont).width(lastMsgInfo_.timestamp) + 4; // We use the full width of the widget if there is no unread msg bubble. const int bottomLineWidthLimit = (unreadMsgCount_ > 0) ? msgStampWidth : 0; @@ -226,7 +228,7 @@ RoomInfoListItem::paintEvent(QPaintEvent *event) else p.setPen(QPen(timestampColor_)); - p.setFont(QFont{}); + p.setFont(tsFont); p.drawText(QPoint(width() - wm.padding - msgStampWidth, top_y), lastMsgInfo_.timestamp); p.restore(); |