Make palette global in Qml

This commit is contained in:
Nicolas Werner 2021-05-13 08:23:56 +02:00
parent 44c5236808
commit a7f8b23b52
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
47 changed files with 226 additions and 169 deletions

View 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;
}