1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-24 08:52:28 +02:00

Appbar on homepage is fixed so the cursor won't be overlapping when scrolling

This commit is contained in:
Alex 2022-04-30 17:03:45 -05:00
parent 8d5626620b
commit 229357df2b
3 changed files with 36 additions and 28 deletions

View File

@ -12,7 +12,7 @@ class ImageGrid extends ConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) { Widget build(BuildContext context, WidgetRef ref) {
return SliverGrid( return SliverGrid(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3, crossAxisCount: 4,
crossAxisSpacing: 5.0, crossAxisSpacing: 5.0,
mainAxisSpacing: 5, mainAxisSpacing: 5,
), ),

View File

@ -100,13 +100,23 @@ class HomePage extends HookConsumerWidget {
top: !isMultiSelectEnable, top: !isMultiSelectEnable,
child: Stack( child: Stack(
children: [ children: [
DraggableScrollbar.semicircle( CustomScrollView(
backgroundColor: Theme.of(context).primaryColor, slivers: [
controller: _scrollController, _buildSliverAppBar(),
heightScrollThumb: 48.0, ],
child: CustomScrollView( ),
Padding(
padding: const EdgeInsets.only(top: 50.0),
child: DraggableScrollbar.semicircle(
backgroundColor: Theme.of(context).primaryColor,
controller: _scrollController, controller: _scrollController,
slivers: [_buildSliverAppBar(), ..._imageGridGroup], heightScrollThumb: 48.0,
child: CustomScrollView(
controller: _scrollController,
slivers: [
..._imageGridGroup,
],
),
), ),
), ),
_buildSelectedItemCountIndicator(), _buildSelectedItemCountIndicator(),

View File

@ -215,31 +215,29 @@ class AlbumViewerPage extends HookConsumerWidget {
onTap: () { onTap: () {
titleFocusNode.unfocus(); titleFocusNode.unfocus();
}, },
child: Stack(children: [ child: DraggableScrollbar.semicircle(
DraggableScrollbar.semicircle( backgroundColor: Theme.of(context).primaryColor,
backgroundColor: Theme.of(context).primaryColor, controller: _scrollController,
heightScrollThumb: 48.0,
child: CustomScrollView(
controller: _scrollController, controller: _scrollController,
heightScrollThumb: 48.0, slivers: [
child: CustomScrollView( _buildHeader(albumInfo),
controller: _scrollController, SliverPersistentHeader(
slivers: [ pinned: true,
_buildHeader(albumInfo), delegate: ImmichSliverPersistentAppBarDelegate(
SliverPersistentHeader( minHeight: 50,
pinned: true, maxHeight: 50,
delegate: ImmichSliverPersistentAppBarDelegate( child: Container(
minHeight: 50, color: immichBackgroundColor,
maxHeight: 50, child: _buildControlButton(albumInfo),
child: Container(
color: immichBackgroundColor,
child: _buildControlButton(albumInfo),
),
), ),
), ),
_buildImageGrid(albumInfo) ),
], _buildImageGrid(albumInfo)
), ],
), ),
]), ),
); );
} }