From fc7fe1dc4c842277c3bfeddf723ba94a2d969a2f Mon Sep 17 00:00:00 2001 From: ashilkn Date: Fri, 19 May 2023 20:37:14 +0530 Subject: [PATCH] Remove backdrop filter and add elevation to bottom action bar --- lib/theme/effects.dart | 4 + .../bottom_action_bar_widget.dart | 108 +++++++++--------- 2 files changed, 57 insertions(+), 55 deletions(-) diff --git a/lib/theme/effects.dart b/lib/theme/effects.dart index 3bc00a3ec..0eb38411a 100644 --- a/lib/theme/effects.dart +++ b/lib/theme/effects.dart @@ -8,6 +8,10 @@ List shadowFloatLight = const [ BoxShadow(blurRadius: 10, color: Color.fromRGBO(0, 0, 0, 0.25)), ]; +List shadowFloatFaintLight = const [ + BoxShadow(blurRadius: 10, color: Color.fromRGBO(0, 0, 0, 0.12)), +]; + List shadowMenuLight = const [ BoxShadow(blurRadius: 6, color: Color.fromRGBO(0, 0, 0, 0.16)), BoxShadow( diff --git a/lib/ui/components/bottom_action_bar/bottom_action_bar_widget.dart b/lib/ui/components/bottom_action_bar/bottom_action_bar_widget.dart index cf6d5c32d..805110327 100644 --- a/lib/ui/components/bottom_action_bar/bottom_action_bar_widget.dart +++ b/lib/ui/components/bottom_action_bar/bottom_action_bar_widget.dart @@ -6,7 +6,7 @@ import 'package:photos/core/constants.dart'; import "package:photos/generated/l10n.dart"; import 'package:photos/models/gallery_type.dart'; import 'package:photos/models/selected_files.dart'; -import 'package:photos/theme/effects.dart'; +import "package:photos/theme/effects.dart"; import 'package:photos/theme/ente_theme.dart'; import 'package:photos/ui/components/bottom_action_bar/action_bar_widget.dart'; import 'package:photos/ui/components/buttons/icon_button_widget.dart'; @@ -42,63 +42,61 @@ class BottomActionBarWidget extends StatelessWidget { final double leftRightPadding = widthOfScreen > restrictedMaxWidth ? (widthOfScreen - restrictedMaxWidth) / 2 : 0; - return ClipRRect( - child: BackdropFilter( - filter: ImageFilter.blur(sigmaX: blurFaint, sigmaY: blurFaint), - child: Container( - color: colorScheme.backdropBase, - padding: EdgeInsets.only( - top: 4, - bottom: hasSmallerBottomPadding ? 24 : 36, - right: leftRightPadding, - left: leftRightPadding, - ), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - ExpandableNotifier( - controller: _expandableController, - child: ExpandablePanel( - theme: _getExpandableTheme(), - header: Padding( - padding: EdgeInsets.symmetric( - horizontal: text == null ? 12 : 0, - ), - child: ActionBarWidget( - selectedFiles: selectedFiles, - galleryType: type, - text: text, - iconButtons: _iconButtons(context), - ), - ), - expanded: expandedMenu, - collapsed: const SizedBox.shrink(), - controller: _expandableController, + return Container( + decoration: BoxDecoration( + color: colorScheme.backgroundElevated, + boxShadow: shadowFloatFaintLight, + ), + padding: EdgeInsets.only( + top: 4, + bottom: hasSmallerBottomPadding ? 24 : 36, + right: leftRightPadding, + left: leftRightPadding, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + ExpandableNotifier( + controller: _expandableController, + child: ExpandablePanel( + theme: _getExpandableTheme(), + header: Padding( + padding: EdgeInsets.symmetric( + horizontal: text == null ? 12 : 0, + ), + child: ActionBarWidget( + selectedFiles: selectedFiles, + galleryType: type, + text: text, + iconButtons: _iconButtons(context), ), ), - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 16, - vertical: 14, - ), - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - onCancel?.call(); - _expandableController.value = false; - }, - child: Center( - child: Text( - S.of(context).cancel, - style: textTheme.bodyBold - .copyWith(color: colorScheme.blurTextBase), - ), - ), - ), - ) - ], + expanded: expandedMenu, + collapsed: const SizedBox.shrink(), + controller: _expandableController, + ), ), - ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 16, + vertical: 14, + ), + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + onCancel?.call(); + _expandableController.value = false; + }, + child: Center( + child: Text( + S.of(context).cancel, + style: textTheme.bodyBold + .copyWith(color: colorScheme.blurTextBase), + ), + ), + ), + ) + ], ), ); }