summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-03-19 20:26:14 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-03-19 20:26:14 +0200
commitd2d65b6662b57edc99d31b6edf47a5f2942d01a8 (patch)
treef7dc687926b1e599f072526d54536ec8e328e126 /src
parentUse the full with of the roomlist for the last message (diff)
downloadnheko-d2d65b6662b57edc99d31b6edf47a5f2942d01a8.tar.xz
More stylistic changes & dark theme tweaks
Diffstat (limited to 'src')
-rw-r--r--src/RoomInfoListItem.cc11
-rw-r--r--src/timeline/TimelineItem.cc8
2 files changed, 10 insertions, 9 deletions
diff --git a/src/RoomInfoListItem.cc b/src/RoomInfoListItem.cc

index 3a422787..5793dc98 100644 --- a/src/RoomInfoListItem.cc +++ b/src/RoomInfoListItem.cc
@@ -280,15 +280,12 @@ RoomInfoListItem::paintEvent(QPaintEvent *event) } if (unreadMsgCount_ > 0) { - QColor textColor("white"); - QColor backgroundColor("#38A3D8"); - QBrush brush; brush.setStyle(Qt::SolidPattern); - brush.setColor(backgroundColor); + brush.setColor(bubbleBgColor()); if (isPressed_) - brush.setColor(textColor); + brush.setColor(bubbleFgColor()); p.setBrush(brush); p.setPen(Qt::NoPen); @@ -306,10 +303,10 @@ RoomInfoListItem::paintEvent(QPaintEvent *event) p.setPen(Qt::NoPen); p.drawEllipse(r); - p.setPen(QPen(textColor)); + p.setPen(QPen(bubbleFgColor())); if (isPressed_) - p.setPen(QPen(backgroundColor)); + p.setPen(QPen(bubbleBgColor())); p.setBrush(Qt::NoBrush); p.drawText( diff --git a/src/timeline/TimelineItem.cc b/src/timeline/TimelineItem.cc
index 371ced10..326b2c14 100644 --- a/src/timeline/TimelineItem.cc +++ b/src/timeline/TimelineItem.cc
@@ -31,6 +31,10 @@ constexpr const static char *CHECKMARK = "✓"; +constexpr int MSG_RIGHT_MARGIN = 7; +constexpr int MSG_BOTTOM_MARGIN = 4; +constexpr int MSG_PADDING = 20; + void TimelineItem::init() { @@ -68,8 +72,8 @@ TimelineItem::init() topLayout_ = new QHBoxLayout(this); mainLayout_ = new QVBoxLayout; messageLayout_ = new QHBoxLayout; - messageLayout_->setContentsMargins(0, 0, 20, 4); - messageLayout_->setSpacing(20); + messageLayout_->setContentsMargins(0, 0, MSG_RIGHT_MARGIN, MSG_BOTTOM_MARGIN); + messageLayout_->setSpacing(MSG_PADDING); topLayout_->setContentsMargins(conf::timeline::msgMargin, conf::timeline::msgMargin, 0, 0); topLayout_->setSpacing(0);