49 lines
1.8 KiB
C++
49 lines
1.8 KiB
C++
|
|
#ifndef DEFAULT_THEME_H
|
||
|
|
#define DEFAULT_THEME_H
|
||
|
|
|
||
|
|
#include <QObject>
|
||
|
|
#include "IThemePlugin.h"
|
||
|
|
|
||
|
|
// ============================================================
|
||
|
|
// DefaultTheme — 内置默认主题
|
||
|
|
//
|
||
|
|
// 包装现有 Skin 的颜色配置,提供标准 GCS 外观。
|
||
|
|
// ============================================================
|
||
|
|
class DefaultTheme : public QObject, public IThemePlugin
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
Q_INTERFACES(IThemePlugin)
|
||
|
|
public:
|
||
|
|
QString name() const override { return "Default"; }
|
||
|
|
QString description() const override { return "GCS 默认主题"; }
|
||
|
|
|
||
|
|
QColor panelBackground() const override { return QColor(25, 25, 28); }
|
||
|
|
QColor panelForeground() const override { return QColor(220, 220, 220); }
|
||
|
|
QColor accentColor() const override { return QColor(0, 120, 215); }
|
||
|
|
QColor warningColor() const override { return QColor(238, 149, 114); }
|
||
|
|
QColor successColor() const override { return QColor(152, 251, 152); }
|
||
|
|
};
|
||
|
|
|
||
|
|
// ============================================================
|
||
|
|
// DarkTheme — 深色主题(可通过 DLL 加载)
|
||
|
|
// ============================================================
|
||
|
|
class DarkTheme : public QObject, public IThemePlugin
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
Q_INTERFACES(IThemePlugin)
|
||
|
|
public:
|
||
|
|
QString name() const override { return "Dark"; }
|
||
|
|
QString description() const override { return "深色主题"; }
|
||
|
|
|
||
|
|
QColor panelBackground() const override { return QColor(18, 18, 18); }
|
||
|
|
QColor panelForeground() const override { return QColor(200, 200, 200); }
|
||
|
|
QColor accentColor() const override { return QColor(80, 160, 240); }
|
||
|
|
QString globalStyleSheet() const override {
|
||
|
|
return "QWidget { background-color: #121212; color: #C8C8C8; }"
|
||
|
|
"QPushButton { background: #333; border: 1px solid #555; padding: 4px 12px; }"
|
||
|
|
"QPushButton:hover { background: #444; }";
|
||
|
|
}
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif
|