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:
IChooseYou
2026-02-10 07:46:18 -07:00
parent 8eab304538
commit 24a7e68136
12 changed files with 885 additions and 208 deletions

29
src/themes/themeeditor.h Normal file
View 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