mirror of
https://github.com/NohamR/Reclass.git
synced 2026-05-10 19:59:21 +00:00
Add theme system with Reclass Dark and Warm built-in themes
Replaces ~40 hardcoded color values with 27 semantic color roles. Adds ThemeManager singleton, theme editor dialog, View > Theme menu, JSON persistence for user themes, and fixes inline edit selection color from blue #264f78 to #2b2b2b.
This commit is contained in:
29
src/themes/themeeditor.h
Normal file
29
src/themes/themeeditor.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
#include "theme.h"
|
||||
#include <QDialog>
|
||||
#include <QVector>
|
||||
#include <QPushButton>
|
||||
|
||||
namespace rcx {
|
||||
|
||||
class ThemeEditor : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ThemeEditor(const Theme& theme, QWidget* parent = nullptr);
|
||||
Theme result() const { return m_theme; }
|
||||
|
||||
private:
|
||||
Theme m_theme;
|
||||
|
||||
struct SwatchEntry {
|
||||
const char* label;
|
||||
QColor Theme::*field;
|
||||
QPushButton* button;
|
||||
};
|
||||
QVector<SwatchEntry> m_swatches;
|
||||
|
||||
void updateSwatch(SwatchEntry& entry);
|
||||
void pickColor(SwatchEntry& entry);
|
||||
};
|
||||
|
||||
} // namespace rcx
|
||||
Reference in New Issue
Block a user