#ifndef PLATFORMTHEME_H #define PLATFORMTHEME_H #include #if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0) #include #else #include #endif #include "hintsettings.h" #include "systemtrayicon.h" #include #include class QIconEngine; class QWindow; class X11Integration; class PlatformTheme : public QObject, public QGenericUnixTheme { Q_OBJECT public: PlatformTheme(); ~PlatformTheme() override; QVariant themeHint(ThemeHint hint) const override; const QFont *font(Font type) const override; QPlatformSystemTrayIcon *createPlatformSystemTrayIcon() const override { auto trayIcon = new SystemTrayIcon; if (trayIcon->isSystemTrayAvailable()) return trayIcon; else { delete trayIcon; return nullptr; } } private: void onFontChanged(); void onIconThemeChanged(); void setQtQuickControlsTheme(); private: HintsSettings *m_hints; QScopedPointer m_x11Integration; }; #endif // PLATFORMTHEME_H