소스 검색

layout changes to MenuItemWidget and CaptionedTextWidget

ashilkn 2 년 전
부모
커밋
8fb752f578
2개의 변경된 파일10개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 1
      lib/ui/components/captioned_text_widget.dart
  2. 9 4
      lib/ui/components/menu_item_widget.dart

+ 1 - 1
lib/ui/components/captioned_text_widget.dart

@@ -23,7 +23,7 @@ class CaptionedTextWidget extends StatelessWidget {
 
 
     return Flexible(
     return Flexible(
       child: Padding(
       child: Padding(
-        padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 2),
+        padding: const EdgeInsets.symmetric(vertical: 14, horizontal: 2),
         child: Row(
         child: Row(
           children: [
           children: [
             Flexible(
             Flexible(

+ 9 - 4
lib/ui/components/menu_item_widget.dart

@@ -5,10 +5,14 @@ import 'package:photos/ente_theme_data.dart';
 class MenuItemWidget extends StatefulWidget {
 class MenuItemWidget extends StatefulWidget {
   final Widget captionedTextWidget;
   final Widget captionedTextWidget;
   final bool isExpandable;
   final bool isExpandable;
-// leading icon can be passed without specifing size of icon, this component sets size to 20x20 irrespective of passed icon's size
+
+  /// leading icon can be passed without specifing size of icon,
+  /// this component sets size to 20x20 irrespective of passed icon's size
   final IconData? leadingIcon;
   final IconData? leadingIcon;
   final Color? leadingIconColor;
   final Color? leadingIconColor;
-// trailing icon can be passed without size as default size set by flutter is what this component expects
+
+  /// trailing icon can be passed without size as default size set by
+  /// flutter is what this component expects
   final IconData? trailingIcon;
   final IconData? trailingIcon;
   final Widget? trailingSwitch;
   final Widget? trailingSwitch;
   final bool trailingIconIsMuted;
   final bool trailingIconIsMuted;
@@ -21,7 +25,8 @@ class MenuItemWidget extends StatefulWidget {
   final ExpandableController? expandableController;
   final ExpandableController? expandableController;
   final bool isBottomBorderRadiusRemoved;
   final bool isBottomBorderRadiusRemoved;
   final bool isTopBorderRadiusRemoved;
   final bool isTopBorderRadiusRemoved;
-  //disable gesture detector if not used
+
+  /// disable gesture detector if not used
   final bool isGestureDetectorDisabled;
   final bool isGestureDetectorDisabled;
   const MenuItemWidget({
   const MenuItemWidget({
     required this.captionedTextWidget,
     required this.captionedTextWidget,
@@ -103,7 +108,7 @@ class _MenuItemWidgetState extends State<MenuItemWidget> {
     return AnimatedContainer(
     return AnimatedContainer(
       duration: const Duration(milliseconds: 20),
       duration: const Duration(milliseconds: 20),
       width: double.infinity,
       width: double.infinity,
-      padding: const EdgeInsets.symmetric(horizontal: 12),
+      padding: const EdgeInsets.only(left: 16, right: 12),
       decoration: BoxDecoration(
       decoration: BoxDecoration(
         borderRadius: BorderRadius.only(
         borderRadius: BorderRadius.only(
           topLeft: topBorderRadius,
           topLeft: topBorderRadius,