mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 10:00:27 +00:00
fix: fluent system theme mode (#94)
* Fix: fluent theme mode fix --------- Co-authored-by: wuke2022 <[email protected]>
This commit is contained in:
1 parent
8bae1a5850
commit
38ba901956
2 files changed
+8
-4
No files matched your search
@@ -13,7 +13,7 @@ PR,合并到 `main` 分支。
|
||||
flutter 项目即可运行。
|
||||
|
||||
## 翻译
|
||||
|
||||
|
||||
Gopeed 的国际化文件位于 `ui/flutter/assets/locales` 目录下,只需要在该目录下添加对应的语言文件即可。
|
||||
|
||||
编辑locales后请运行以下命令:
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
import 'package:fluent_ui/fluent_ui.dart' as fluent;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -258,9 +260,11 @@ class FileListView extends GetView {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return fluent.FluentTheme(
|
||||
data: appController.downloaderConfig.value.extra.themeMode == 'dark'
|
||||
? fluent.ThemeData(brightness: Brightness.dark)
|
||||
: fluent.ThemeData(brightness: Brightness.light),
|
||||
data: appController.downloaderConfig.value.extra.themeMode == 'system'
|
||||
? fluent.FluentThemeData(brightness: ui.window.platformBrightness)
|
||||
: appController.downloaderConfig.value.extra.themeMode == 'light'
|
||||
? fluent.FluentThemeData(brightness: Brightness.light)
|
||||
: fluent.FluentThemeData(brightness: Brightness.dark),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
||||
Reference in new issue
Block a user