Make palette global in Qml
This commit is contained in:
parent
44c5236808
commit
a7f8b23b52
47 changed files with 226 additions and 169 deletions
27
src/ui/NhekoGlobalObject.cpp
Normal file
27
src/ui/NhekoGlobalObject.cpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
// SPDX-FileCopyrightText: 2021 Nheko Contributors
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include "NhekoGlobalObject.h"
|
||||
|
||||
#include "UserSettingsPage.h"
|
||||
|
||||
Nheko::Nheko()
|
||||
{
|
||||
connect(
|
||||
UserSettings::instance().get(), &UserSettings::themeChanged, this, &Nheko::colorsChanged);
|
||||
}
|
||||
|
||||
QPalette
|
||||
Nheko::colors() const
|
||||
{
|
||||
return QPalette();
|
||||
}
|
||||
|
||||
QPalette
|
||||
Nheko::inactiveColors() const
|
||||
{
|
||||
QPalette p;
|
||||
p.setCurrentColorGroup(QPalette::ColorGroup::Inactive);
|
||||
return p;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue