From c6a5d5f7b1b1fad3a0b5e63c02c847a149e72efe Mon Sep 17 00:00:00 2001 From: Piotr Rogowski Date: Sun, 25 Dec 2022 11:52:01 +0100 Subject: [PATCH] fix: macOS logo placement --- lib/components/root/sidebar.dart | 24 ++++++++++++++++-------- macos/Podfile.lock | 6 ++++++ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/lib/components/root/sidebar.dart b/lib/components/root/sidebar.dart index 62cc569ee..602e037ef 100644 --- a/lib/components/root/sidebar.dart +++ b/lib/components/root/sidebar.dart @@ -15,6 +15,7 @@ import 'package:spotube/provider/spotify_provider.dart'; import 'package:spotube/provider/user_preferences_provider.dart'; import 'package:spotube/services/queries/queries.dart'; +import 'package:spotube/utils/platform.dart'; import 'package:spotube/utils/type_conversion_utils.dart'; import 'package:fluent_ui/fluent_ui.dart' as fluent_ui; @@ -38,6 +39,8 @@ class Sidebar extends HookConsumerWidget { ); } + static Widget macSpacer = const SizedBox(height: 25); + static void goToSettings(BuildContext context) { GoRouter.of(context).go("/settings"); } @@ -62,9 +65,11 @@ class Sidebar extends HookConsumerWidget { labelType: NavigationRailLabelType.all, extended: false, backgroundColor: PlatformTheme.of(context).scaffoldBackgroundColor, - leading: Padding( - padding: const EdgeInsets.all(8.0), - child: brandLogo(), + leading: Column( + children: [ + if (kIsMacOS) macSpacer, + brandLogo(), + ], ), trailing: PlatformIconButton( icon: const Icon(fluent_ui.FluentIcons.settings), @@ -151,13 +156,16 @@ class Sidebar extends HookConsumerWidget { expanded: true, header: Padding( padding: const EdgeInsets.all(8.0), - child: Row( + child: Column( children: [ - brandLogo(), - const SizedBox( - width: 10, + if (kIsMacOS) macSpacer, + Row( + children: [ + brandLogo(), + const SizedBox(width: 10), + PlatformText.headline("Spotube"), + ], ), - PlatformText.headline("Spotube"), ], ), ), diff --git a/macos/Podfile.lock b/macos/Podfile.lock index d1daba6e0..99c0177d6 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -14,6 +14,8 @@ PODS: - FMDB (2.7.5): - FMDB/standard (= 2.7.5) - FMDB/standard (2.7.5) + - macos_ui (0.1.0): + - FlutterMacOS - metadata_god (0.0.1): - FlutterMacOS - package_info_plus_macos (0.0.1): @@ -36,6 +38,7 @@ DEPENDENCIES: - bitsdojo_window_macos (from `Flutter/ephemeral/.symlinks/plugins/bitsdojo_window_macos/macos`) - connectivity_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/connectivity_plus_macos/macos`) - FlutterMacOS (from `Flutter/ephemeral`) + - macos_ui (from `Flutter/ephemeral/.symlinks/plugins/macos_ui/macos`) - metadata_god (from `Flutter/ephemeral/.symlinks/plugins/metadata_god/macos`) - package_info_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus_macos/macos`) - path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`) @@ -61,6 +64,8 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/connectivity_plus_macos/macos FlutterMacOS: :path: Flutter/ephemeral + macos_ui: + :path: Flutter/ephemeral/.symlinks/plugins/macos_ui/macos metadata_god: :path: Flutter/ephemeral/.symlinks/plugins/metadata_god/macos package_info_plus_macos: @@ -82,6 +87,7 @@ SPEC CHECKSUMS: connectivity_plus_macos: f6e86fd000e971d361e54b5afcadc8c8fa773308 FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a + macos_ui: 125c911559d646194386d84c017ad6819122e2db metadata_god: 55a71136c95eb75ec28142f6fbfc2bcff6f881b1 package_info_plus_macos: f010621b07802a241d96d01876d6705f15e77c1c path_provider_macos: 3c0c3b4b0d4a76d2bf989a913c2de869c5641a19