mirror of https://github.com/Nheko-Reborn/nheko
parent
44c5236808
commit
a7f8b23b52
@ -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; |
||||
} |
@ -0,0 +1,25 @@ |
||||
// SPDX-FileCopyrightText: 2021 Nheko Contributors
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once |
||||
|
||||
#include <QObject> |
||||
#include <QPalette> |
||||
|
||||
class Nheko : public QObject |
||||
{ |
||||
Q_OBJECT |
||||
|
||||
Q_PROPERTY(QPalette colors READ colors NOTIFY colorsChanged) |
||||
Q_PROPERTY(QPalette inactiveColors READ inactiveColors NOTIFY colorsChanged) |
||||
|
||||
public: |
||||
Nheko(); |
||||
|
||||
QPalette colors() const; |
||||
QPalette inactiveColors() const; |
||||
|
||||
signals: |
||||
void colorsChanged(); |
||||
}; |
Loading…
Reference in new issue