first commit
This commit is contained in:
32
utils/stylehelper.h
Normal file
32
utils/stylehelper.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef STYLEHELPER_H
|
||||
#define STYLEHELPER_H
|
||||
|
||||
#include <QApplication>
|
||||
#include <QString>
|
||||
|
||||
class StyleHelper
|
||||
{
|
||||
public:
|
||||
static void applyGlobalStyle(QApplication *app);
|
||||
static QString getGlobalStyleSheet();
|
||||
|
||||
// 颜色获取
|
||||
static QString primaryColor() { return "#2196F3"; }
|
||||
static QString accentColor() { return "#FF9800"; }
|
||||
static QString successColor() { return "#4CAF50"; }
|
||||
static QString warningColor() { return "#FFC107"; }
|
||||
static QString dangerColor() { return "#F44336"; }
|
||||
static QString backgroundColor() { return "#F5F5F5"; }
|
||||
static QString surfaceColor() { return "#FFFFFF"; }
|
||||
static QString textPrimaryColor() { return "#212121"; }
|
||||
static QString textSecondaryColor() { return "#757575"; }
|
||||
|
||||
// 阴影样式
|
||||
static QString cardShadow();
|
||||
static QString buttonShadow();
|
||||
|
||||
private:
|
||||
StyleHelper() = default;
|
||||
};
|
||||
|
||||
#endif // STYLEHELPER_H
|
||||
Reference in New Issue
Block a user