Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Use same scroll bar thumb color on gallery for iOS and Android

ashilkn19b41d365eee
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/scrollbar/scroll_bar_with_use_notifier.dart b/mobile/apps/photos/lib/ui/viewer/gallery/scrollbar/scroll_bar_with_use_notifier.dart
index 50d686c27a..339a489985 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/scrollbar/scroll_bar_with_use_notifier.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/scrollbar/scroll_bar_with_use_notifier.dart
@@ -159,19 +159,32 @@ class ScrollbarWithUseNotifer extends StatelessWidget {
@override
Widget build(BuildContext context) {
- return _MaterialScrollbar(
- controller: controller,
- thumbVisibility: thumbVisibility,
- trackVisibility: trackVisibility,
- thickness: thickness,
- radius: radius,
- notificationPredicate: notificationPredicate,
- interactive: interactive,
- scrollbarOrientation: scrollbarOrientation,
- inUseNotifier: inUseNotifier,
- minScrollbarLength: minScrollbarLength,
- showThumb: showThumb,
- child: child,
+ return ScrollbarTheme(
+ data: ScrollbarTheme.of(context).copyWith(
+ thumbColor: Theme.of(context).brightness == Brightness.dark
+ ? const WidgetStatePropertyAll(Color.fromARGB(244, 215, 215, 215))
+ : WidgetStateProperty.resolveWith((Set<WidgetState> states) {
+ if (states.contains(WidgetState.dragged)) {
+ return const Color.fromARGB(243, 143, 143, 143);
+ }
+
+ return const Color.fromARGB(244, 199, 199, 199);
+ }),
+ ),
+ child: _MaterialScrollbar(
+ controller: controller,
+ thumbVisibility: thumbVisibility,
+ trackVisibility: trackVisibility,
+ thickness: thickness,
+ radius: radius,
+ notificationPredicate: notificationPredicate,
+ interactive: interactive,
+ scrollbarOrientation: scrollbarOrientation,
+ inUseNotifier: inUseNotifier,
+ minScrollbarLength: minScrollbarLength,
+ showThumb: showThumb,
+ child: child,
+ ),
);
}
}