mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-18 10:40:48 -04:00
add: rainbow_style.h
Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
27
src/citron/util/rainbow_style.h
Normal file
27
src/citron/util/rainbow_style.h
Normal 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;
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user