/* KWin - the KDE window manager This file is part of the KDE project. SPDX-FileCopyrightText: 2014 Martin Gräßlin SPDX-FileCopyrightText: 2014 Hugo Pereira Da Costa SPDX-FileCopyrightText: 2015 Mika Allan Rauhala SPDX-License-Identifier: GPL-2.0-or-later */ #ifndef KWIN_DECORATION_PALETTE_H #define KWIN_DECORATION_PALETTE_H #include #include #include #include #include #include #include namespace KWin { namespace Decoration { class DecorationPalette : public QObject { Q_OBJECT public: DecorationPalette(const QString &colorScheme); bool isValid() const; QColor color(KDecoration2::ColorGroup group, KDecoration2::ColorRole role) const; QPalette palette() const; Q_SIGNALS: void changed(); private: void update(); QString m_colorScheme; KConfigWatcher::Ptr m_watcher; struct LegacyPalette { QPalette palette; QColor activeTitleBarColor; QColor inactiveTitleBarColor; QColor activeFrameColor; QColor inactiveFrameColor; QColor activeForegroundColor; QColor inactiveForegroundColor; QColor warningForegroundColor; }; struct ModernPalette { KColorScheme active; KColorScheme inactive; }; std::optional m_legacyPalette; KSharedConfig::Ptr m_colorSchemeConfig; ModernPalette m_palette; }; } } #endif