From aede55eb72fb78363618c568bbdb43238640f592 Mon Sep 17 00:00:00 2001 From: AmanRajSinghMourya Date: Fri, 25 Jul 2025 09:50:45 +0530 Subject: [PATCH] Fix: adjust spacing in the image editor app bar --- .../image_editor/image_editor_app_bar.dart | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_app_bar.dart b/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_app_bar.dart index 85f2ab2d65..03e84cf75d 100644 --- a/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_app_bar.dart +++ b/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_app_bar.dart @@ -64,7 +64,7 @@ class ImageEditorAppBar extends StatelessWidget implements PreferredSizeWidget { ), ), ), - const SizedBox(width: 16), + const SizedBox(width: 12), IconButton( tooltip: 'Redo', onPressed: () { @@ -80,17 +80,27 @@ class ImageEditorAppBar extends StatelessWidget implements PreferredSizeWidget { ), ], ), - TextButton( - onPressed: () { - done(); - }, - child: Text( - isMainEditor ? 'Save Copy' : 'Done', - style: getEnteTextTheme(context).body.copyWith( - color: enableUndo - ? Theme.of(context).colorScheme.imageEditorPrimaryColor - : colorScheme.textMuted, - ), + AnimatedSwitcher( + duration: const Duration(milliseconds: 250), + transitionBuilder: (child, animation) => + FadeTransition(opacity: animation, child: child), + child: TextButton( + key: ValueKey(isMainEditor ? 'save_copy' : 'done'), + onPressed: done, + child: Text( + isMainEditor ? 'Save Copy' : 'Done', + style: getEnteTextTheme(context).body.copyWith( + color: isMainEditor + ? (enableUndo + ? Theme.of(context) + .colorScheme + .imageEditorPrimaryColor + : colorScheme.textMuted) + : Theme.of(context) + .colorScheme + .imageEditorPrimaryColor, + ), + ), ), ), ],