From 2d13d2cfbb38e829f3ef42576ab91ed380f68d09 Mon Sep 17 00:00:00 2001 From: guidezpl Date: Tue, 28 Jan 2020 15:29:24 +0100 Subject: [PATCH 1/4] Add padding to demo appBar --- gallery/gallery/lib/pages/demo.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gallery/gallery/lib/pages/demo.dart b/gallery/gallery/lib/pages/demo.dart index fbc1c9fe325..eb428bef4f8 100644 --- a/gallery/gallery/lib/pages/demo.dart +++ b/gallery/gallery/lib/pages/demo.dart @@ -179,6 +179,7 @@ class _DemoPageState extends State with TickerProviderStateMixin { final colorScheme = Theme.of(context).colorScheme; final iconColor = colorScheme.onSurface; final selectedIconColor = colorScheme.primary; + final appBarPadding = 20.0; final appBar = AppBar( backgroundColor: Colors.transparent, @@ -190,6 +191,7 @@ class _DemoPageState extends State with TickerProviderStateMixin { }, ), actions: [ + SizedBox(width: appBarPadding), if (_hasOptions) IconButton( icon: FeatureDiscovery( @@ -245,6 +247,7 @@ class _DemoPageState extends State with TickerProviderStateMixin { _state == _DemoState.fullscreen ? selectedIconColor : iconColor, onPressed: () => _handleTap(_DemoState.fullscreen), ), + SizedBox(width: appBarPadding), ], ); From 02f65a28fdd4988186719a1d752a1c106a596780 Mon Sep 17 00:00:00 2001 From: guidezpl Date: Tue, 28 Jan 2020 15:47:12 +0100 Subject: [PATCH 2/4] Update demo.dart --- gallery/gallery/lib/pages/demo.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gallery/gallery/lib/pages/demo.dart b/gallery/gallery/lib/pages/demo.dart index eb428bef4f8..86cddd02d4a 100644 --- a/gallery/gallery/lib/pages/demo.dart +++ b/gallery/gallery/lib/pages/demo.dart @@ -179,7 +179,6 @@ class _DemoPageState extends State with TickerProviderStateMixin { final colorScheme = Theme.of(context).colorScheme; final iconColor = colorScheme.onSurface; final selectedIconColor = colorScheme.primary; - final appBarPadding = 20.0; final appBar = AppBar( backgroundColor: Colors.transparent, @@ -191,7 +190,6 @@ class _DemoPageState extends State with TickerProviderStateMixin { }, ), actions: [ - SizedBox(width: appBarPadding), if (_hasOptions) IconButton( icon: FeatureDiscovery( @@ -247,7 +245,7 @@ class _DemoPageState extends State with TickerProviderStateMixin { _state == _DemoState.fullscreen ? selectedIconColor : iconColor, onPressed: () => _handleTap(_DemoState.fullscreen), ), - SizedBox(width: appBarPadding), + SizedBox(width: 20), ], ); From 443bc1fcd6efc055e161d2720c8fe4276dcd4b6b Mon Sep 17 00:00:00 2001 From: guidezpl Date: Tue, 28 Jan 2020 16:25:24 +0100 Subject: [PATCH 3/4] Add padding to leading icon as well --- gallery/gallery/lib/pages/demo.dart | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/gallery/gallery/lib/pages/demo.dart b/gallery/gallery/lib/pages/demo.dart index 86cddd02d4a..a4f8d51aff2 100644 --- a/gallery/gallery/lib/pages/demo.dart +++ b/gallery/gallery/lib/pages/demo.dart @@ -179,15 +179,19 @@ class _DemoPageState extends State with TickerProviderStateMixin { final colorScheme = Theme.of(context).colorScheme; final iconColor = colorScheme.onSurface; final selectedIconColor = colorScheme.primary; + final appBarPadding = 20.0; final appBar = AppBar( backgroundColor: Colors.transparent, - leading: IconButton( - icon: const BackButtonIcon(), - tooltip: MaterialLocalizations.of(context).backButtonTooltip, - onPressed: () { - Navigator.maybePop(context); - }, + leading: Padding( + padding: EdgeInsetsDirectional.only(start: appBarPadding), + child: IconButton( + icon: const BackButtonIcon(), + tooltip: MaterialLocalizations.of(context).backButtonTooltip, + onPressed: () { + Navigator.maybePop(context); + }, + ), ), actions: [ if (_hasOptions) @@ -245,7 +249,7 @@ class _DemoPageState extends State with TickerProviderStateMixin { _state == _DemoState.fullscreen ? selectedIconColor : iconColor, onPressed: () => _handleTap(_DemoState.fullscreen), ), - SizedBox(width: 20), + SizedBox(width: appBarPadding), ], ); From 4324517df4a039a33ed6683792e3d35f4797303c Mon Sep 17 00:00:00 2001 From: guidezpl Date: Tue, 28 Jan 2020 16:43:56 +0100 Subject: [PATCH 4/4] Update demo.dart --- gallery/gallery/lib/pages/demo.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gallery/gallery/lib/pages/demo.dart b/gallery/gallery/lib/pages/demo.dart index a4f8d51aff2..76ca05100a6 100644 --- a/gallery/gallery/lib/pages/demo.dart +++ b/gallery/gallery/lib/pages/demo.dart @@ -179,7 +179,7 @@ class _DemoPageState extends State with TickerProviderStateMixin { final colorScheme = Theme.of(context).colorScheme; final iconColor = colorScheme.onSurface; final selectedIconColor = colorScheme.primary; - final appBarPadding = 20.0; + final appBarPadding = isDesktop ? 20.0 : 0.0; final appBar = AppBar( backgroundColor: Colors.transparent,