From 3f2d1e0843f26353154b03ee70849b3341767995 Mon Sep 17 00:00:00 2001 From: office-pc nix root Date: Sun, 29 Sep 2024 12:06:01 +0800 Subject: [PATCH] fix some ui issues --- lib/main.dart | 7 +++++++ lib/player/views/components/player_controls.dart | 2 ++ .../views/components/system_setting_slider.dart | 13 ++++++++++--- pubspec.yaml | 2 +- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 15a7a2ec..b229a20d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -201,6 +201,9 @@ class MyApp extends StatelessWidget { systemOverlayStyle: getUiOverlayStyle(context, dark: darkColorScheme, light: lightColorScheme)); + var sliderTheme = + const SliderThemeData(inactiveTrackColor: Colors.blue); + return MaterialApp.router( routerConfig: appRouter.config( navigatorObservers: () => [MyRouteObserver()], @@ -251,6 +254,8 @@ class MyApp extends StatelessWidget { navigationBarTheme: navigationBarTheme, navigationRailTheme: navigationRailTheme, appBarTheme: appBarTheme, + sliderTheme: sliderTheme.copyWith( + inactiveTrackColor: lightColorScheme.secondaryContainer), progressIndicatorTheme: ProgressIndicatorThemeData( circularTrackColor: lightColorScheme.secondaryContainer .withOpacity(0.8))), @@ -260,6 +265,8 @@ class MyApp extends StatelessWidget { appBarTheme: appBarTheme, navigationBarTheme: navigationBarTheme, navigationRailTheme: navigationRailTheme, + sliderTheme: sliderTheme.copyWith( + inactiveTrackColor: darkColorScheme.secondaryContainer), progressIndicatorTheme: ProgressIndicatorThemeData( circularTrackColor: darkColorScheme.secondaryContainer.withOpacity(0.8))), diff --git a/lib/player/views/components/player_controls.dart b/lib/player/views/components/player_controls.dart index e6b42cd2..c539015f 100644 --- a/lib/player/views/components/player_controls.dart +++ b/lib/player/views/components/player_controls.dart @@ -223,6 +223,8 @@ class PlayerControls extends StatelessWidget { data: ThemeData( useMaterial3: true, colorScheme: darkColorScheme, + sliderTheme: SliderThemeData( + inactiveTrackColor: darkColorScheme.secondaryContainer), progressIndicatorTheme: ProgressIndicatorThemeData( circularTrackColor: darkColorScheme.secondaryContainer.withOpacity(0.8))), diff --git a/lib/player/views/components/system_setting_slider.dart b/lib/player/views/components/system_setting_slider.dart index 7dd0e228..8604a373 100644 --- a/lib/player/views/components/system_setting_slider.dart +++ b/lib/player/views/components/system_setting_slider.dart @@ -23,13 +23,20 @@ class SystemSettingsSlider extends StatelessWidget { children: [ Expanded( child: FractionallySizedBox( - alignment: Alignment.bottomCenter, widthFactor: 0.5, - heightFactor: value, child: Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular(20), - color: colors.primary), + color: colors.primary.withOpacity(0.1)), + child: FractionallySizedBox( + alignment: Alignment.bottomCenter, + heightFactor: value, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + color: colors.primary), + ), + ), ), ), ), diff --git a/pubspec.yaml b/pubspec.yaml index d84fa86d..140dd23d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: clipious -version: 1.22.0+4063 +version: 1.22.1+4064 publish_to: none description: Client for invidious. environment: