From e9f83b59922aed15d75a138a5a8c6612c7a29adb Mon Sep 17 00:00:00 2001 From: Lamparter <71598437+Lamparter@users.noreply.github.com> Date: Sun, 12 Jan 2025 09:53:42 +0000 Subject: [PATCH 1/5] Add info bar when adaptive layout is disabled --- src/Files.App/Strings/en-US/Resources.resw | 3 +++ src/Files.App/UserControls/InnerNavigationToolbar.xaml | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/Files.App/Strings/en-US/Resources.resw b/src/Files.App/Strings/en-US/Resources.resw index 2892c9cde50d..875f192fc0fa 100644 --- a/src/Files.App/Strings/en-US/Resources.resw +++ b/src/Files.App/Strings/en-US/Resources.resw @@ -4042,4 +4042,7 @@ Add to shelf Tooltip that displays when dragging items to the Shelf Pane + + Sync layout across directories must be disabled. + \ No newline at end of file diff --git a/src/Files.App/UserControls/InnerNavigationToolbar.xaml b/src/Files.App/UserControls/InnerNavigationToolbar.xaml index a5490e9e7878..47b42c910554 100644 --- a/src/Files.App/UserControls/InnerNavigationToolbar.xaml +++ b/src/Files.App/UserControls/InnerNavigationToolbar.xaml @@ -1182,6 +1182,11 @@ + From d5424a0930049a855624278eb24981776a72f739 Mon Sep 17 00:00:00 2001 From: Lamparter <71598437+Lamparter@users.noreply.github.com> Date: Sun, 12 Jan 2025 09:55:07 +0000 Subject: [PATCH 2/5] Add comment to localised string --- src/Files.App/Strings/en-US/Resources.resw | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Files.App/Strings/en-US/Resources.resw b/src/Files.App/Strings/en-US/Resources.resw index 875f192fc0fa..90698bd8bc6d 100644 --- a/src/Files.App/Strings/en-US/Resources.resw +++ b/src/Files.App/Strings/en-US/Resources.resw @@ -4044,5 +4044,6 @@ Sync layout across directories must be disabled. + This text appears as part of an info bar when the adaptive layout button is disabled. The localized text must be short as it will cause display issues otherwise. \ No newline at end of file From 18bd64ec60d497b9ff7100260ae6bb2f31f3a7a5 Mon Sep 17 00:00:00 2001 From: Lamparter <71598437+Lamparter@users.noreply.github.com> Date: Sun, 12 Jan 2025 16:08:01 +0000 Subject: [PATCH 3/5] Revert old changes with info bar --- src/Files.App/Strings/en-US/Resources.resw | 4 ---- src/Files.App/UserControls/InnerNavigationToolbar.xaml | 5 ----- 2 files changed, 9 deletions(-) diff --git a/src/Files.App/Strings/en-US/Resources.resw b/src/Files.App/Strings/en-US/Resources.resw index 2b25a5d89e3a..47ffdc413c7d 100644 --- a/src/Files.App/Strings/en-US/Resources.resw +++ b/src/Files.App/Strings/en-US/Resources.resw @@ -4054,8 +4054,4 @@ Add to shelf Tooltip that displays when dragging items to the Shelf Pane - - Sync layout across directories must be disabled. - This text appears as part of an info bar when the adaptive layout button is disabled. The localized text must be short as it will cause display issues otherwise. - \ No newline at end of file diff --git a/src/Files.App/UserControls/InnerNavigationToolbar.xaml b/src/Files.App/UserControls/InnerNavigationToolbar.xaml index 47b42c910554..a5490e9e7878 100644 --- a/src/Files.App/UserControls/InnerNavigationToolbar.xaml +++ b/src/Files.App/UserControls/InnerNavigationToolbar.xaml @@ -1182,11 +1182,6 @@ - From a2a90858a72bf9f56414ea7ebced4f66e9be85ba Mon Sep 17 00:00:00 2001 From: Lamparter <71598437+Lamparter@users.noreply.github.com> Date: Sun, 12 Jan 2025 16:41:43 +0000 Subject: [PATCH 4/5] Hide the adaptive layout toggle if it is not available --- .../UserControls/InnerNavigationToolbar.xaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Files.App/UserControls/InnerNavigationToolbar.xaml b/src/Files.App/UserControls/InnerNavigationToolbar.xaml index a5490e9e7878..2f8608e9be8f 100644 --- a/src/Files.App/UserControls/InnerNavigationToolbar.xaml +++ b/src/Files.App/UserControls/InnerNavigationToolbar.xaml @@ -1122,9 +1122,9 @@ - - - + + + @@ -1167,7 +1167,8 @@ Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" - Text="{x:Bind Commands.LayoutAdaptive.Label}" /> + Text="{x:Bind Commands.LayoutAdaptive.Label}" + Visibility="{x:Bind Commands.LayoutAdaptive.IsExecutable, Mode=OneWay}" /> - + ToolTipService.ToolTip="{x:Bind Commands.LayoutAdaptive.LabelWithHotKey, Mode=OneWay}" + Visibility="{x:Bind Commands.LayoutAdaptive.IsExecutable, Mode=OneWay}" /> From d8730440c47c03bc7c6c751bcd6d76ae59b2adbf Mon Sep 17 00:00:00 2001 From: Lamparter <71598437+Lamparter@users.noreply.github.com> Date: Tue, 14 Jan 2025 07:32:31 +0000 Subject: [PATCH 5/5] Replace Visibility with x:Load --- src/Files.App/UserControls/InnerNavigationToolbar.xaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Files.App/UserControls/InnerNavigationToolbar.xaml b/src/Files.App/UserControls/InnerNavigationToolbar.xaml index 2f8608e9be8f..e8a20252bad2 100644 --- a/src/Files.App/UserControls/InnerNavigationToolbar.xaml +++ b/src/Files.App/UserControls/InnerNavigationToolbar.xaml @@ -1164,23 +1164,25 @@ + x:Load="{x:Bind Commands.LayoutAdaptive.IsExecutable, Mode=OneWay}" + Text="{x:Bind Commands.LayoutAdaptive.Label}" /> + ToolTipService.ToolTip="{x:Bind Commands.LayoutAdaptive.LabelWithHotKey, Mode=OneWay}" />