From 825edf6ea444d469dde948c3d2cfad510c3918fe Mon Sep 17 00:00:00 2001 From: Collecting Date: Tue, 23 Dec 2025 01:12:02 +0000 Subject: [PATCH] add: rainbow_style.h Signed-off-by: Collecting --- src/citron/util/rainbow_style.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/citron/util/rainbow_style.h diff --git a/src/citron/util/rainbow_style.h b/src/citron/util/rainbow_style.h new file mode 100644 index 000000000..f45fde2aa --- /dev/null +++ b/src/citron/util/rainbow_style.h @@ -0,0 +1,27 @@ +// SPDX-FileCopyrightText: 2025 citron Emulator Project + +#pragma once + +#include +#include +#include + +class RainbowStyle : public QProxyStyle { + Q_OBJECT + +public: + explicit RainbowStyle(QStyle* baseStyle = nullptr); + + // This intercepts palette requests from every widget in the app + QPalette standardPalette() const override; + + // A helper for widgets that need the color directly + static QColor GetCurrentHighlightColor(); + +private slots: + void UpdateHue(); + +private: + QTimer* m_timer; + static float s_hue; +};