Adjust create button

This commit is contained in:
Hillel Coren 2022-08-28 21:35:24 +03:00
parent c6264789c4
commit 3b909c1fa5
3 changed files with 16 additions and 18 deletions

View File

@ -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,
],
);

View File

@ -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,

View File

@ -86,20 +86,17 @@ class TaskScreen extends StatelessWidget {
}
},
appBarLeadingActions: [
Expanded(
child: IconButton(
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: