// // Created by rigoligo on 2021/5/8. // #pragma once #include #include #include #include #include "dtkplugin/spkdtkplugin.h" namespace SpkUi { enum SpkUiStyle { Light, Dark }; enum SpkButtonStyle { Normal = 0, Recommend, Warn }; constexpr int StackTraceArraySize = 64; constexpr const char * const StoreIconName = "spark-store"; extern SpkUiStyle CurrentStyle; extern QString StylesheetBase, CurrentStylesheet; extern QColor ColorLine, ColorBack; extern QSize PrimaryScreenSize; extern SpkDtkPlugin *DtkPlugin; extern QStyle *OldSystemStyle; extern QList CurrentColorSet; namespace States { extern bool IsDDE, IsUsingDtkPlugin; } namespace Priv { extern bool CrashHandlerActivated; } void Initialize(); void GuessAppropriateTheme(); void PrepareForDeepinDesktop(); bool CheckIsDeepinDesktop(); QString StylesheetFromColors(QList); QIcon GetThemedIcon(QString); QColor ColorTextOnBackground(QColor); void CrashSignalHandler(int); void SetGlobalStyle(SpkUiStyle); };