From ea9c453e49dc9a5a9debb02ef81a173ee4ce5428 Mon Sep 17 00:00:00 2001 From: Edouard Marquez Date: Fri, 2 Sep 2022 12:38:01 +0200 Subject: [PATCH] Vertical axis for permission dialog + small ui fixes --- .../lib/generic_lib/dialogs/smooth_alert_dialog.dart | 10 ++++++++-- packages/smooth_app/lib/pages/scan/scan_page.dart | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/smooth_app/lib/generic_lib/dialogs/smooth_alert_dialog.dart b/packages/smooth_app/lib/generic_lib/dialogs/smooth_alert_dialog.dart index eee456ef0a5..c44fb607f5c 100644 --- a/packages/smooth_app/lib/generic_lib/dialogs/smooth_alert_dialog.dart +++ b/packages/smooth_app/lib/generic_lib/dialogs/smooth_alert_dialog.dart @@ -255,7 +255,8 @@ class SmoothActionButtonsBar extends StatelessWidget { children: actions, ); } else { - return IntrinsicWidth( + return SizedBox( + width: double.infinity, child: Column( mainAxisAlignment: MainAxisAlignment.end, children: actions, @@ -369,8 +370,9 @@ class _SmoothActionElevatedButton extends StatelessWidget { return SmoothSimpleButton( onPressed: buttonData.onPressed, minWidth: buttonData.minWidth ?? 20.0, - // if fitted box not used then even the one word text overflows into next line, + // Ensures FittedBox not used then even the one word text overflows into next line, child: FittedBox( + fit: BoxFit.scaleDown, child: Text( buttonData.text.toUpperCase(), textAlign: TextAlign.center, @@ -414,6 +416,9 @@ class _SmoothActionFlatButton extends StatelessWidget { textStyle: themeData.textTheme.bodyText2!.copyWith( color: themeData.colorScheme.onPrimary, ), + padding: const EdgeInsets.symmetric( + horizontal: SMALL_SPACE, + ), ), child: SizedBox( height: buttonData.lines != null @@ -421,6 +426,7 @@ class _SmoothActionFlatButton extends StatelessWidget { : null, width: buttonData.minWidth, child: FittedBox( + fit: BoxFit.scaleDown, child: Text( buttonData.text.toUpperCase(), style: TextStyle( diff --git a/packages/smooth_app/lib/pages/scan/scan_page.dart b/packages/smooth_app/lib/pages/scan/scan_page.dart index d8ee941295d..24881998143 100644 --- a/packages/smooth_app/lib/pages/scan/scan_page.dart +++ b/packages/smooth_app/lib/pages/scan/scan_page.dart @@ -269,6 +269,7 @@ class _ScanPageTopWidget extends StatelessWidget { onPressed: () => Navigator.of(context).pop(true), lines: 2, ), + actionsAxis: Axis.vertical, ); }); });