add: rainbow_style.h

Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
Collecting
2025-12-23 01:12:02 +00:00
parent f156856d7e
commit 825edf6ea4

View File

@@ -0,0 +1,27 @@
// SPDX-FileCopyrightText: 2025 citron Emulator Project
#pragma once
#include <QProxyStyle>
#include <QTimer>
#include <QColor>
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;
};