summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-11-25 22:20:34 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-11-25 22:20:34 +0200
commit54cf3418bc323b96b78e944c16f34082d5c2ef89 (patch)
tree3fa5772e566f07c6fdcfe7cd7236bd0669f88783
parentf0ecf6eee6d6c9270f2e21f4f57af3f91044bd6c (diff)
Paint RoomList's background (#137)
-rw-r--r--include/RoomList.h3
-rw-r--r--resources/styles/nheko-dark.qss5
-rw-r--r--resources/styles/nheko.qss19
-rw-r--r--src/RoomList.cc9
4 files changed, 29 insertions, 7 deletions
diff --git a/include/RoomList.h b/include/RoomList.h
index 7a48f7bd..aa7c919c 100644
--- a/include/RoomList.h
+++ b/include/RoomList.h
@@ -68,6 +68,9 @@ public slots:
void closeLeaveRoomDialog(bool leaving, const QString &room_id);
void clearRoomMessageCount(const QString &room_id);
+protected:
+ void paintEvent(QPaintEvent *event) override;
+
private:
void calculateUnreadMessageCount();
diff --git a/resources/styles/nheko-dark.qss b/resources/styles/nheko-dark.qss
index 0ad68452..0d68acfb 100644
--- a/resources/styles/nheko-dark.qss
+++ b/resources/styles/nheko-dark.qss
@@ -12,6 +12,11 @@ TimelineView > * {
background-color: #383c4a;
}
+RoomList,
+RoomList > * {
+ background-color: #383c4a;
+}
+
FlatButton {
qproperty-foregroundColor: #caccd1;
qproperty-backgroundColor: #333;
diff --git a/resources/styles/nheko.qss b/resources/styles/nheko.qss
index f156f305..4840e9b5 100644
--- a/resources/styles/nheko.qss
+++ b/resources/styles/nheko.qss
@@ -3,21 +3,26 @@ QLabel {
}
#chatPage,
-#chatPage > * {
- background-color: white;
+#chatPage > * {
+ background-color: white;
}
TimelineView,
TimelineView > * {
- background-color: white;
+ background-color: white;
+}
+
+RoomList,
+RoomList > * {
+ background-color: white;
}
-FlatButton {
- qproperty-foregroundColor: #333;
+FlatButton {
+ qproperty-foregroundColor: #333;
}
-RaisedButton {
- qproperty-foregroundColor: white;
+RaisedButton {
+ qproperty-foregroundColor: white;
}
RoomInfoListItem {
diff --git a/src/RoomList.cc b/src/RoomList.cc
index 402633c3..7560a616 100644
--- a/src/RoomList.cc
+++ b/src/RoomList.cc
@@ -281,3 +281,12 @@ RoomList::closeLeaveRoomDialog(bool leaving, const QString &room_id)
client_->leaveRoom(room_id);
}
}
+
+void
+RoomList::paintEvent(QPaintEvent *)
+{
+ QStyleOption opt;
+ opt.init(this);
+ QPainter p(this);
+ style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
+}