summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoe Donofry <joe@joedonofry.com>2019-01-12 14:35:56 +0000
committerJoe Donofry <joe@joedonofry.com>2019-01-12 14:35:56 +0000
commitae91bab07d737bcf91bb7ae2210b4a74d846b9b7 (patch)
tree6105723919702b7d0acee300220cafb38e658d48
parentIncrease the height of the roomlist items (diff)
downloadnheko-ae91bab07d737bcf91bb7ae2210b4a74d846b9b7.tar.xz
Tweak some of the colors in the CSS rules for nheko.
Add room list hover title/subtitle color change support.
-rw-r--r--resources/styles/nheko.qss18
-rw-r--r--src/RoomInfoListItem.cpp4
-rw-r--r--src/RoomInfoListItem.h12
3 files changed, 26 insertions, 8 deletions
diff --git a/resources/styles/nheko.qss b/resources/styles/nheko.qss

index 408d954e..bf616c1f 100644 --- a/resources/styles/nheko.qss +++ b/resources/styles/nheko.qss
@@ -10,8 +10,8 @@ QLabel { #sideBar { border: none; - border-right: 1px solid #dcdcdc; - border-left: 1px solid #dcdcdc; + border-right: 1px solid #dee1f3; + border-left: 1px solid #dee1f3; } TimelineView, @@ -49,17 +49,17 @@ PopupItem { RoomList, RoomList > * { - background-color: white; + background-color: #2e3649; border: none; } #roomlist_area { - background-color: white; + background-color: #2e3649; } CommunitiesList, CommunitiesList > * { - background-color: white; + background-color: #2e3649; } FlatButton { @@ -85,7 +85,9 @@ RaisedButton { RoomInfoListItem { qproperty-highlightedBackgroundColor: #38A3D8; qproperty-hoverBackgroundColor: rgba(200, 200, 200, 70); - qproperty-backgroundColor: white; + qproperty-hoverTitleColor: #f2f5f8; + qproperty-hoverSubtitleColor: white; + qproperty-backgroundColor: #f2f5f8; qproperty-titleColor: #333; qproperty-subtitleColor: #5d6565; @@ -109,7 +111,7 @@ RoomInfoListItem { CommunitiesListItem { qproperty-highlightedBackgroundColor: #38A3D8; qproperty-hoverBackgroundColor: rgba(200, 200, 200, 70); - qproperty-backgroundColor: white; + qproperty-backgroundColor: #f2f5f8; qproperty-avatarBgColor: #eee; qproperty-avatarFgColor: black; @@ -130,7 +132,7 @@ UserInfoWidget, UserInfoWidget > * { UserInfoWidget { border: none; - border-bottom: 1px solid #dcdcdc; + border-bottom: 2px solid #ccc; } UserSettingsPage { diff --git a/src/RoomInfoListItem.cpp b/src/RoomInfoListItem.cpp
index 10908d88..e9cae165 100644 --- a/src/RoomInfoListItem.cpp +++ b/src/RoomInfoListItem.cpp
@@ -158,8 +158,12 @@ RoomInfoListItem::paintEvent(QPaintEvent *event) subtitlePen.setColor(highlightedSubtitleColor_); } else if (underMouse()) { p.fillRect(rect(), hoverBackgroundColor_); + titlePen.setColor(hoverTitleColor_); + subtitlePen.setColor(hoverSubtitleColor_); } else { p.fillRect(rect(), backgroundColor_); + titlePen.setColor(titleColor_); + subtitlePen.setColor(subtitleColor_); } QRect avatarRegion(wm.padding, wm.padding, wm.iconSize, wm.iconSize); diff --git a/src/RoomInfoListItem.h b/src/RoomInfoListItem.h
index 46baa40d..4f3e9372 100644 --- a/src/RoomInfoListItem.h +++ b/src/RoomInfoListItem.h
@@ -55,6 +55,11 @@ class RoomInfoListItem : public QWidget Q_PROPERTY(QColor highlightedSubtitleColor READ highlightedSubtitleColor WRITE setHighlightedSubtitleColor) + Q_PROPERTY( + QColor hoverTitleColor READ hoverTitleColor WRITE setHoverTitleColor) + Q_PROPERTY(QColor hoverSubtitleColor READ hoverSubtitleColor WRITE + setHoverSubtitleColor) + Q_PROPERTY(QColor btnColor READ btnColor WRITE setBtnColor) Q_PROPERTY(QColor btnTextColor READ btnTextColor WRITE setBtnTextColor) @@ -74,6 +79,8 @@ public: QColor highlightedBackgroundColor() const { return highlightedBackgroundColor_; } QColor hoverBackgroundColor() const { return hoverBackgroundColor_; } + QColor hoverTitleColor() const { return hoverTitleColor_; } + QColor hoverSubtitleColor() const { return hoverSubtitleColor_; } QColor backgroundColor() const { return backgroundColor_; } QColor avatarBgColor() const { return avatarBgColor_; } QColor avatarFgColor() const { return avatarFgColor_; } @@ -93,6 +100,8 @@ public: void setHighlightedBackgroundColor(QColor &color) { highlightedBackgroundColor_ = color; } void setHoverBackgroundColor(QColor &color) { hoverBackgroundColor_ = color; } + void setHoverSubtitleColor(QColor &color) { hoverSubtitleColor_ = color; } + void setHoverTitleColor(QColor &color) { hoverTitleColor_ = color; } void setBackgroundColor(QColor &color) { backgroundColor_ = color; } void setTimestampColor(QColor &color) { timestampColor_ = color; } void setAvatarFgColor(QColor &color) { avatarFgColor_ = color; } @@ -186,6 +195,9 @@ private: QColor titleColor_; QColor subtitleColor_; + QColor hoverTitleColor_; + QColor hoverSubtitleColor_; + QColor btnColor_; QColor btnTextColor_;