From 74fd6c9663b97ba8aba5054ccd98a599e9a3405f Mon Sep 17 00:00:00 2001 From: fourtf Date: Wed, 24 Jan 2018 20:35:26 +0100 Subject: [PATCH] Fixes #258 theme change doesn't apply --- src/widgets/basewidget.hpp | 4 ++-- src/widgets/helper/channelview.cpp | 7 +++++++ src/widgets/helper/channelview.hpp | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/widgets/basewidget.hpp b/src/widgets/basewidget.hpp index 8030655ed..0228418b1 100644 --- a/src/widgets/basewidget.hpp +++ b/src/widgets/basewidget.hpp @@ -30,10 +30,10 @@ protected: float dpiMultiplier = 1.f; + virtual void refreshTheme(); + private: void init(); - - virtual void refreshTheme(); }; } // namespace widgets diff --git a/src/widgets/helper/channelview.cpp b/src/widgets/helper/channelview.cpp index e5296c88d..6f25aba52 100644 --- a/src/widgets/helper/channelview.cpp +++ b/src/widgets/helper/channelview.cpp @@ -114,6 +114,13 @@ ChannelView::~ChannelView() this->messageReplacedConnection.disconnect(); } +void ChannelView::refreshTheme() +{ + BaseWidget::refreshTheme(); + + this->layoutMessages(); +} + void ChannelView::queueUpdate() { if (this->updateTimer.isActive()) { diff --git a/src/widgets/helper/channelview.hpp b/src/widgets/helper/channelview.hpp index edc43c7cf..2661f2031 100644 --- a/src/widgets/helper/channelview.hpp +++ b/src/widgets/helper/channelview.hpp @@ -52,6 +52,8 @@ public: pajlada::Signals::NoArgSignal highlightedMessageReceived; protected: + virtual void refreshTheme() override; + virtual void resizeEvent(QResizeEvent *) override; virtual void paintEvent(QPaintEvent *) override;