mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-23 06:33:43 +08:00
移动颜色配置到 AppGlobalUIModel
This commit is contained in:
parent
2d70fca71b
commit
6494c7971e
@ -43,10 +43,6 @@ class AppConf {
|
||||
|
||||
static late final WindowsDeviceInfo windowsDeviceInfo;
|
||||
|
||||
static String colorBackground = "#132431";
|
||||
static String colorMenu = "#122D42";
|
||||
static String colorMica = "#0A3142";
|
||||
|
||||
static const isMSE =
|
||||
String.fromEnvironment("MSE", defaultValue: "false") == "true";
|
||||
|
||||
|
@ -16,6 +16,11 @@ final globalUIModel = AppGlobalUIModel();
|
||||
final globalUIModelProvider = ChangeNotifierProvider((ref) => globalUIModel);
|
||||
|
||||
class AppGlobalUIModel extends BaseUIModel {
|
||||
|
||||
String colorBackground = "#132431";
|
||||
String colorMenu = "#122D42";
|
||||
String colorMica = "#0A3142";
|
||||
|
||||
Future<bool> checkUpdate(BuildContext context, {bool init = true}) async {
|
||||
if (AppConf.isMSE) return true;
|
||||
if (!init) {
|
||||
|
@ -36,10 +36,11 @@ class AppUI extends BaseUI {
|
||||
brightness: Brightness.dark,
|
||||
fontFamily: "SourceHanSansCN-Regular",
|
||||
navigationPaneTheme: NavigationPaneThemeData(
|
||||
backgroundColor: HexColor(AppConf.colorBackground).withOpacity(.75),
|
||||
backgroundColor:
|
||||
HexColor(globalUIModel.colorBackground).withOpacity(.75),
|
||||
),
|
||||
menuColor: HexColor(AppConf.colorMenu).withOpacity(.95),
|
||||
micaBackgroundColor: HexColor(AppConf.colorMica),
|
||||
menuColor: HexColor(globalUIModel.colorMenu).withOpacity(.95),
|
||||
micaBackgroundColor: HexColor(globalUIModel.colorMica),
|
||||
),
|
||||
debugShowCheckedModeBanner: false,
|
||||
home: BaseUIContainer(
|
||||
|
Loading…
Reference in New Issue
Block a user