mirror of
https://github.com/immich-app/immich.git
synced 2025-01-27 22:22:45 +01:00
fix(mobile) timeline slider no longer dissapears (#9358)
fix(mobile) added heightOffset, scrollbar accounts for main appBar and does not get squished Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
55031cc117
commit
34d8879d32
2 changed files with 8 additions and 1 deletions
mobile/lib/widgets/asset_grid
|
@ -36,6 +36,9 @@ class DraggableScrollbar extends StatefulWidget {
|
||||||
/// The amount of padding that should surround the thumb
|
/// The amount of padding that should surround the thumb
|
||||||
final EdgeInsetsGeometry? padding;
|
final EdgeInsetsGeometry? padding;
|
||||||
|
|
||||||
|
/// The height offset of the thumb/bar from the bottom of the page
|
||||||
|
final double? heightOffset;
|
||||||
|
|
||||||
/// Determines how quickly the scrollbar will animate in and out
|
/// Determines how quickly the scrollbar will animate in and out
|
||||||
final Duration scrollbarAnimationDuration;
|
final Duration scrollbarAnimationDuration;
|
||||||
|
|
||||||
|
@ -67,6 +70,7 @@ class DraggableScrollbar extends StatefulWidget {
|
||||||
this.heightScrollThumb = 48.0,
|
this.heightScrollThumb = 48.0,
|
||||||
this.backgroundColor = Colors.white,
|
this.backgroundColor = Colors.white,
|
||||||
this.padding,
|
this.padding,
|
||||||
|
this.heightOffset,
|
||||||
this.scrollbarAnimationDuration = const Duration(milliseconds: 300),
|
this.scrollbarAnimationDuration = const Duration(milliseconds: 300),
|
||||||
this.scrollbarTimeToFade = const Duration(milliseconds: 600),
|
this.scrollbarTimeToFade = const Duration(milliseconds: 600),
|
||||||
this.labelTextBuilder,
|
this.labelTextBuilder,
|
||||||
|
@ -247,7 +251,9 @@ class DraggableScrollbarState extends State<DraggableScrollbar>
|
||||||
}
|
}
|
||||||
|
|
||||||
double get barMaxScrollExtent =>
|
double get barMaxScrollExtent =>
|
||||||
(context.size?.height ?? 0) - widget.heightScrollThumb;
|
(context.size?.height ?? 0) -
|
||||||
|
widget.heightScrollThumb -
|
||||||
|
(widget.heightOffset ?? 0);
|
||||||
|
|
||||||
double get barMinScrollExtent => 0;
|
double get barMinScrollExtent => 0;
|
||||||
|
|
||||||
|
|
|
@ -267,6 +267,7 @@ class ImmichAssetGridViewState extends ConsumerState<ImmichAssetGridView> {
|
||||||
padding: appBarOffset()
|
padding: appBarOffset()
|
||||||
? const EdgeInsets.only(top: 60)
|
? const EdgeInsets.only(top: 60)
|
||||||
: const EdgeInsets.only(),
|
: const EdgeInsets.only(),
|
||||||
|
heightOffset: appBarOffset() ? 60 : 0,
|
||||||
labelConstraints: const BoxConstraints(maxHeight: 28),
|
labelConstraints: const BoxConstraints(maxHeight: 28),
|
||||||
scrollbarAnimationDuration: const Duration(milliseconds: 300),
|
scrollbarAnimationDuration: const Duration(milliseconds: 300),
|
||||||
scrollbarTimeToFade: const Duration(milliseconds: 1000),
|
scrollbarTimeToFade: const Duration(milliseconds: 1000),
|
||||||
|
|
Loading…
Reference in a new issue