From 7253dc2c54465c9bd5bd81c38b1bd8a4927864eb Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Sun, 18 Mar 2018 15:54:53 +0200 Subject: roomlist: Put the message timestamp on the top --- include/Config.h | 9 +++++---- include/RoomInfoListItem.h | 20 +++++++++++--------- 2 files changed, 16 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/Config.h b/include/Config.h index 6874a2e5..40276df0 100644 --- a/include/Config.h +++ b/include/Config.h @@ -56,9 +56,10 @@ static constexpr int cornerRadius = 3; // RoomList specific. namespace roomlist { namespace fonts { -static constexpr int heading = 14; -static constexpr int badge = 10; -static constexpr int bubble = 20; +static constexpr int heading = 14; +static constexpr int timestamp = heading - 1; +static constexpr int badge = 10; +static constexpr int bubble = 20; } // namespace fonts } // namespace roomlist @@ -84,7 +85,7 @@ static constexpr int headerLeftMargin = 15; namespace fonts { static constexpr int timestamp = 13; -static constexpr int dateSeparator = conf::fontSize - 2; +static constexpr int dateSeparator = conf::fontSize; } // namespace fonts } // namespace timeline diff --git a/include/RoomInfoListItem.h b/include/RoomInfoListItem.h index 213f0479..389a8512 100644 --- a/include/RoomInfoListItem.h +++ b/include/RoomInfoListItem.h @@ -75,10 +75,10 @@ public: update(); } - QString roomId(); - bool isPressed() const { return isPressed_; }; + QString roomId() { return roomId_; } + bool isPressed() const { return isPressed_; } QSharedPointer state() const { return state_; } - int unreadMessageCount() const { return unreadMsgCount_; }; + int unreadMessageCount() const { return unreadMsgCount_; } void setAvatar(const QImage &avatar_image); void setDescriptionMessage(const DescInfo &info); @@ -184,10 +184,12 @@ private: QRectF acceptBtnRegion_; QRectF declineBtnRegion_; -}; -inline QString -RoomInfoListItem::roomId() -{ - return roomId_; -} + // Fonts + QFont bubbleFont_; + QFont font_; + QFont headingFont_; + QFont timestampFont_; + QFont usernameFont_; + QFont unreadCountFont_; +}; -- cgit 1.5.1