Przeglądaj źródła

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

martyfuhry 2 lat temu
rodzic
commit
c90dcde7cc

+ 5 - 16
mobile/lib/modules/asset_viewer/ui/top_control_app_bar.dart

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