diff --git a/lib/ui/app/list_scaffold.dart b/lib/ui/app/list_scaffold.dart index d726d36df..b117c1818 100644 --- a/lib/ui/app/list_scaffold.dart +++ b/lib/ui/app/list_scaffold.dart @@ -100,10 +100,10 @@ class ListScaffold extends StatelessWidget { double leadingWidth = 0; if (entityType == EntityType.settings) { - leadingWidth = isDesktop(context) ? 0 : 40; + leadingWidth = isDesktop(context) ? 0 : kMinInteractiveDimension; } else { - leadingWidth = (isDesktop(context) ? 90 : 10) + - kMinInteractiveDimension * + leadingWidth = (isDesktop(context) ? 100 : 10) + + (kMinInteractiveDimension - 4) * (appBarLeadingActions.length + (onCheckboxPressed == null || isMobile(context) ? 1 : 2)); } @@ -120,6 +120,7 @@ class ListScaffold extends StatelessWidget { ? null : () => onCheckboxPressed(), ), + if (appBarLeadingActions.isNotEmpty) SizedBox(width: 4), ...appBarLeadingActions, ], ); diff --git a/lib/ui/reports/reports_screen.dart b/lib/ui/reports/reports_screen.dart index bbb7096fc..f7a657620 100644 --- a/lib/ui/reports/reports_screen.dart +++ b/lib/ui/reports/reports_screen.dart @@ -319,7 +319,7 @@ class ReportsScreen extends StatelessWidget { appBar: AppBar( centerTitle: false, automaticallyImplyLeading: false, - leadingWidth: isMobile(context) ? 40 : 0, + leadingWidth: isMobile(context) ? kMinInteractiveDimension : 0, leading: leading, title: Row( mainAxisSize: MainAxisSize.min, diff --git a/lib/ui/task/task_screen.dart b/lib/ui/task/task_screen.dart index 42e30078f..dba848f52 100644 --- a/lib/ui/task/task_screen.dart +++ b/lib/ui/task/task_screen.dart @@ -86,20 +86,17 @@ class TaskScreen extends StatelessWidget { } }, appBarLeadingActions: [ - Expanded( - child: IconButton( - icon: Icon( - state.prefState.showKanban ? Icons.view_list : MdiIcons.trello), - onPressed: () { - if (isDesktop(context) && !state.prefState.showKanban) { - store.dispatch(ViewTask(taskId: '')); - } - - store.dispatch( - UpdateUserPreferences(showKanban: !state.prefState.showKanban), - ); - }, - ), + IconButton( + icon: Icon( + state.prefState.showKanban ? Icons.view_list : MdiIcons.trello), + onPressed: () { + if (isDesktop(context) && !state.prefState.showKanban) { + store.dispatch(ViewTask(taskId: '')); + } + store.dispatch( + UpdateUserPreferences(showKanban: !state.prefState.showKanban), + ); + }, ) ], body: