1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-25 10:43:13 +02:00

cleaned up action bar, changed horizontal more to info button (#1727)

This commit is contained in:
martyfuhry 2023-02-10 17:11:09 -05:00 committed by GitHub
parent d91cc3616b
commit c90dcde7cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,12 +31,10 @@ class TopControlAppBar extends HookConsumerWidget {
@override @override
Widget build(BuildContext context, WidgetRef ref) { Widget build(BuildContext context, WidgetRef ref) {
double iconSize = 18.0; const double iconSize = 18.0;
Widget buildFavoriteButton() { Widget buildFavoriteButton() {
return IconButton( return IconButton(
iconSize: iconSize,
splashRadius: iconSize,
onPressed: () { onPressed: () {
onFavorite(); onFavorite();
}, },
@ -60,12 +58,13 @@ class TopControlAppBar extends HookConsumerWidget {
color: Colors.grey[200], color: Colors.grey[200],
), ),
), ),
actionsIconTheme: const IconThemeData(
size: iconSize,
),
actions: [ actions: [
if (asset.isRemote) buildFavoriteButton(), if (asset.isRemote) buildFavoriteButton(),
if (asset.livePhotoVideoId != null) if (asset.livePhotoVideoId != null)
IconButton( IconButton(
iconSize: iconSize,
splashRadius: iconSize,
onPressed: () { onPressed: () {
onToggleMotionVideo(); onToggleMotionVideo();
}, },
@ -81,8 +80,6 @@ class TopControlAppBar extends HookConsumerWidget {
), ),
if (!asset.isLocal) if (!asset.isLocal)
IconButton( IconButton(
iconSize: iconSize,
splashRadius: iconSize,
onPressed: onDownloadPressed, onPressed: onDownloadPressed,
icon: Icon( icon: Icon(
Icons.cloud_download_outlined, Icons.cloud_download_outlined,
@ -90,8 +87,6 @@ class TopControlAppBar extends HookConsumerWidget {
), ),
), ),
IconButton( IconButton(
iconSize: iconSize,
splashRadius: iconSize,
onPressed: () { onPressed: () {
onSharePressed(); onSharePressed();
}, },
@ -102,8 +97,6 @@ class TopControlAppBar extends HookConsumerWidget {
), ),
if (asset.isRemote) if (asset.isRemote)
IconButton( IconButton(
iconSize: iconSize,
splashRadius: iconSize,
onPressed: () { onPressed: () {
onAddToAlbumPressed(); onAddToAlbumPressed();
}, },
@ -113,8 +106,6 @@ class TopControlAppBar extends HookConsumerWidget {
), ),
), ),
IconButton( IconButton(
iconSize: iconSize,
splashRadius: iconSize,
onPressed: () { onPressed: () {
onDeletePressed(); onDeletePressed();
}, },
@ -124,13 +115,11 @@ class TopControlAppBar extends HookConsumerWidget {
), ),
), ),
IconButton( IconButton(
iconSize: iconSize,
splashRadius: iconSize,
onPressed: () { onPressed: () {
onMoreInfoPressed(); onMoreInfoPressed();
}, },
icon: Icon( icon: Icon(
Icons.more_horiz_rounded, Icons.info_outline_rounded,
color: Colors.grey[200], color: Colors.grey[200],
), ),
), ),