diff --git a/lib/core/themes/app_theme.dart b/lib/core/themes/app_theme.dart index b358f1f80..b1db12a87 100644 --- a/lib/core/themes/app_theme.dart +++ b/lib/core/themes/app_theme.dart @@ -5,6 +5,13 @@ class AppTheme { brightness: Brightness.light, primaryColor: Colors.blue, scaffoldBackgroundColor: Colors.white, + // colorScheme: const ColorScheme.light( + // primary: Colors.blue, // 主色:蓝色(修复:确保 colorScheme.primary 为蓝色) + // secondary: Color(0xFF5E5CE6), // 次色:紫色,与暗色主题保持一致 + // surface: Colors.white, + // background: Colors.white, + // error: Colors.redAccent, + // ), appBarTheme: const AppBarTheme( backgroundColor: Colors.blue, foregroundColor: Colors.white, diff --git a/lib/modules/home/views/home_view.dart b/lib/modules/home/views/home_view.dart index 31678e85f..6be0315bd 100644 --- a/lib/modules/home/views/home_view.dart +++ b/lib/modules/home/views/home_view.dart @@ -167,15 +167,14 @@ class HomeView extends GetView { // 中文注释:去除菜单模式,直接在同一行展示“语音打断”与开关 Obx(() => Row( mainAxisSize: MainAxisSize.min, // 中文注释:按需占宽,避免占满右侧 - mainAxisAlignment: - MainAxisAlignment.end, // 中文注释:靠右紧凑排布 + mainAxisAlignment: MainAxisAlignment.end, // 中文注释:靠右紧凑排布 children: [ Icon( controller.isTtsInterruptEnabled.value ? Icons.voice_over_off : Icons.voice_over_off_outlined, color: controller.isTtsInterruptEnabled.value - ? Theme.of(Get.context!).colorScheme.primary + ? Colors.blue : (isDarkMode ? Colors.grey[600] : Colors.grey[600]), size: 14.sp, // 中文注释:图标保持较小尺寸,减少占位 ), @@ -194,7 +193,7 @@ class HomeView extends GetView { child: Switch( value: controller.isTtsInterruptEnabled.value, onChanged: (value) => controller.toggleTtsInterrupt(), - activeColor: Theme.of(Get.context!).colorScheme.primary, + activeColor: Colors.blue, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, ), ), @@ -631,7 +630,7 @@ class HomeView extends GetView { batteryColor = Colors.red[600]!; } - bool isBatteryZero = batteryLevel == -1; + bool isBatteryZero = batteryLevel == -1 || batteryLevel == 0; return Expanded( child: Padding(