2021-03-05 02:35:15 +03:00
|
|
|
// SPDX-FileCopyrightText: 2021 Nheko Contributors
|
2022-01-01 06:57:53 +03:00
|
|
|
// SPDX-FileCopyrightText: 2022 Nheko Contributors
|
2023-01-02 06:25:33 +03:00
|
|
|
// SPDX-FileCopyrightText: 2023 Nheko Contributors
|
2021-03-05 02:35:15 +03:00
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2017-05-16 21:46:45 +03:00
|
|
|
#pragma once
|
2017-04-06 02:06:42 +03:00
|
|
|
|
|
|
|
#include <QColor>
|
2021-05-15 00:35:34 +03:00
|
|
|
#include <QPalette>
|
2017-04-06 02:06:42 +03:00
|
|
|
|
2022-10-10 15:38:29 +03:00
|
|
|
class Theme final : public QPalette
|
2017-04-06 02:06:42 +03:00
|
|
|
{
|
2021-09-18 01:22:33 +03:00
|
|
|
Q_GADGET
|
|
|
|
Q_PROPERTY(QColor sidebarBackground READ sidebarBackground CONSTANT)
|
|
|
|
Q_PROPERTY(QColor alternateButton READ alternateButton CONSTANT)
|
|
|
|
Q_PROPERTY(QColor separator READ separator CONSTANT)
|
|
|
|
Q_PROPERTY(QColor red READ red CONSTANT)
|
2021-12-26 21:58:08 +03:00
|
|
|
Q_PROPERTY(QColor green READ green CONSTANT)
|
2021-11-12 20:08:01 +03:00
|
|
|
Q_PROPERTY(QColor error READ error CONSTANT)
|
2021-11-02 00:20:15 +03:00
|
|
|
Q_PROPERTY(QColor orange READ orange CONSTANT)
|
2022-10-02 00:57:02 +03:00
|
|
|
Q_PROPERTY(QColor online READ online CONSTANT)
|
|
|
|
Q_PROPERTY(QColor unavailable READ unavailable CONSTANT)
|
2017-04-06 02:06:42 +03:00
|
|
|
public:
|
2021-09-18 01:22:33 +03:00
|
|
|
Theme() {}
|
2021-12-29 10:05:29 +03:00
|
|
|
explicit Theme(QStringView theme);
|
|
|
|
static QPalette paletteFromTheme(QStringView theme);
|
2017-04-06 02:06:42 +03:00
|
|
|
|
2021-09-18 01:22:33 +03:00
|
|
|
QColor sidebarBackground() const { return sidebarBackground_; }
|
|
|
|
QColor alternateButton() const { return alternateButton_; }
|
|
|
|
QColor separator() const { return separator_; }
|
|
|
|
QColor red() const { return red_; }
|
2021-12-26 21:58:08 +03:00
|
|
|
QColor green() const { return green_; }
|
|
|
|
QColor error() const { return error_; }
|
2021-11-02 00:20:15 +03:00
|
|
|
QColor orange() const { return orange_; }
|
2022-10-02 00:57:02 +03:00
|
|
|
QColor online() const { return QColor(0x00, 0xcc, 0x66); }
|
|
|
|
QColor unavailable() const { return QColor(0xff, 0x99, 0x33); }
|
2017-04-06 02:06:42 +03:00
|
|
|
|
|
|
|
private:
|
2021-12-26 21:58:08 +03:00
|
|
|
QColor sidebarBackground_, separator_, red_, green_, error_, orange_, alternateButton_;
|
2017-04-06 02:06:42 +03:00
|
|
|
};
|