diff --git a/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart index 054f058739..acd7ede6dc 100644 --- a/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart @@ -22,7 +22,9 @@ import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_shee enum AddToMenuItem { album, archive, unarchive, lockedFolder } class AddActionButton extends ConsumerStatefulWidget { - const AddActionButton({super.key}); + const AddActionButton({super.key, this.originalTheme}); + + final ThemeData? originalTheme; @override ConsumerState createState() => _AddActionButtonState(); @@ -71,7 +73,7 @@ class _AddActionButtonState extends ConsumerState { ), if (isOwner) ...[ - const PopupMenuDivider(), + const Divider(), Padding( padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), child: Text("move_to".tr(), style: context.textTheme.labelMedium), @@ -166,16 +168,25 @@ class _AddActionButtonState extends ConsumerState { return const SizedBox.shrink(); } + final themeData = widget.originalTheme ?? context.themeData; + return MenuAnchor( consumeOutsideTap: true, style: MenuStyle( - backgroundColor: WidgetStatePropertyAll(context.themeData.scaffoldBackgroundColor), + backgroundColor: WidgetStatePropertyAll(themeData.scaffoldBackgroundColor), elevation: const WidgetStatePropertyAll(4), shape: const WidgetStatePropertyAll( RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(12))), ), ), - menuChildren: _buildMenuChildren(), + menuChildren: widget.originalTheme != null + ? [ + Theme( + data: widget.originalTheme!, + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: _buildMenuChildren()), + ), + ] + : _buildMenuChildren(), builder: (context, controller, child) { return BaseActionButton( iconData: Icons.add, diff --git a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart index 14c03ad637..67bbc4c83a 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart @@ -38,11 +38,13 @@ class ViewerBottomBar extends ConsumerWidget { opacity = 0; } + final originalTheme = context.themeData; + final actions = [ const ShareActionButton(source: ActionSource.viewer), if (asset.isLocalOnly) const UploadActionButton(source: ActionSource.viewer), if (asset.type == AssetType.image) const EditImageActionButton(), - if (asset.hasRemote) const AddActionButton(), + if (asset.hasRemote) AddActionButton(originalTheme: originalTheme), if (isOwner) ...[ asset.isLocalOnly