Respect Theme in Input Completion & Quick Switcher (#4671)

This commit is contained in:
nerix
2023-06-10 14:38:23 +02:00
committed by GitHub
parent 65a14fb95b
commit 839ba60fd8
5 changed files with 61 additions and 27 deletions
@@ -10,6 +10,7 @@
#include "providers/twitch/TwitchChannel.hpp"
#include "providers/twitch/TwitchIrcServer.hpp"
#include "singletons/Emotes.hpp"
#include "singletons/Theme.hpp"
#include "util/LayoutCreator.hpp"
#include "widgets/listview/GenericListView.hpp"
#include "widgets/splits/InputCompletionItem.hpp"
@@ -141,6 +142,7 @@ InputCompletionPopup::InputCompletionPopup(QWidget *parent)
, model_(this)
{
this->initLayout();
this->themeChangedEvent();
QObject::connect(&this->redrawTimer_, &QTimer::timeout, this, [this] {
if (this->isVisible())
@@ -227,6 +229,13 @@ void InputCompletionPopup::hideEvent(QHideEvent * /*event*/)
this->redrawTimer_.stop();
}
void InputCompletionPopup::themeChangedEvent()
{
BasePopup::themeChangedEvent();
this->ui_.listView->refreshTheme(*getTheme());
}
void InputCompletionPopup::initLayout()
{
LayoutCreator creator = {this};
@@ -50,6 +50,8 @@ protected:
void showEvent(QShowEvent *event) override;
void hideEvent(QHideEvent *event) override;
void themeChangedEvent() override;
private:
void initLayout();