From 19b526d4533841ca91209929f0d6aef6042a8eeb Mon Sep 17 00:00:00 2001 From: Max Sandholm Date: Thu, 16 Nov 2017 16:33:52 +0200 Subject: Use system color scheme (using a Qt stylesheet) #104 The color scheme of nheko obeys the default color theme of Qt (i.e. the system theme). It uses a Qt stylesheet to accomplish this, which means replacing the color theme with a custom theme would only be a matter of writing a new style sheet and loading it into the app. --- include/TimelineView.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include/TimelineView.h') diff --git a/include/TimelineView.h b/include/TimelineView.h index bc7c41e6..78c31e8e 100644 --- a/include/TimelineView.h +++ b/include/TimelineView.h @@ -21,6 +21,8 @@ #include #include #include +#include +#include #include "Emote.h" #include "Image.h" @@ -110,7 +112,7 @@ public slots: void addBackwardsEvents(const QString &room_id, const RoomMessages &msgs); // Whether or not the initial batch has been loaded. - bool hasLoaded() { return scroll_layout_->count() > 1 || isTimelineFinished; }; + bool hasLoaded() { return scroll_layout_->count() > 1 || isTimelineFinished; } void handleFailedMessage(int txnid); @@ -120,6 +122,9 @@ private slots: signals: void updateLastTimelineMessage(const QString &user, const DescInfo &info); +protected: + void paintEvent(QPaintEvent *event) override; + private: void init(); void addTimelineItem(TimelineItem *item, TimelineDirection direction); @@ -133,7 +138,7 @@ private: bool isPendingMessage(const QString &txnid, const QString &sender, const QString &userid); void removePendingMessage(const QString &txnid); - bool isDuplicate(const QString &event_id) { return eventIds_.contains(event_id); }; + bool isDuplicate(const QString &event_id) { return eventIds_.contains(event_id); } void handleNewUserMessage(PendingMessage msg); -- cgit 1.5.1