From 5bae95dbf3bcc9b2bf236afe1f23dc761c7dfd9f Mon Sep 17 00:00:00 2001
From: Yair <39923744+yaira2@users.noreply.github.com>
Date: Mon, 27 May 2024 17:13:28 -0400
Subject: [PATCH 01/12] Code Quality: Change active pane border thickness in
high contrast
---
.../Views/Shells/ModernShellPage.xaml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/Files.App/Views/Shells/ModernShellPage.xaml b/src/Files.App/Views/Shells/ModernShellPage.xaml
index 5ab126a577e1..f1022095f0fe 100644
--- a/src/Files.App/Views/Shells/ModernShellPage.xaml
+++ b/src/Files.App/Views/Shells/ModernShellPage.xaml
@@ -13,6 +13,22 @@
Loaded="Page_Loaded"
mc:Ignorable="d">
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 3
+
+
+
+
+
+
+
From 3a0582c404b9ab4deb6c519128d0cc17093e1d5d Mon Sep 17 00:00:00 2001
From: Yair <39923744+yaira2@users.noreply.github.com>
Date: Mon, 27 May 2024 17:14:31 -0400
Subject: [PATCH 02/12] Update ModernShellPage.xaml
---
src/Files.App/Views/Shells/ModernShellPage.xaml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Files.App/Views/Shells/ModernShellPage.xaml b/src/Files.App/Views/Shells/ModernShellPage.xaml
index f1022095f0fe..e50ec1492dfe 100644
--- a/src/Files.App/Views/Shells/ModernShellPage.xaml
+++ b/src/Files.App/Views/Shells/ModernShellPage.xaml
@@ -17,13 +17,13 @@
- 1
+ 1
- 1
+ 1
- 3
+ 3
@@ -100,7 +100,7 @@
-
+
From 113c24e912690c4f804d89db988d7c39bc5781d0 Mon Sep 17 00:00:00 2001
From: Yair <39923744+yaira2@users.noreply.github.com>
Date: Mon, 27 May 2024 17:36:29 -0400
Subject: [PATCH 03/12] Adjust shadow on active pane
---
src/Files.App/Views/PaneHolderPage.xaml.cs | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/Files.App/Views/PaneHolderPage.xaml.cs b/src/Files.App/Views/PaneHolderPage.xaml.cs
index 439db7c9f929..4f9a2f251996 100644
--- a/src/Files.App/Views/PaneHolderPage.xaml.cs
+++ b/src/Files.App/Views/PaneHolderPage.xaml.cs
@@ -347,7 +347,7 @@ private void Pane_Loaded(object sender, RoutedEventArgs e)
((UIElement)sender).GotFocus += Pane_GotFocus;
((UIElement)sender).RightTapped += Pane_RightTapped;
- PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 8);
+ PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 32);
}
private void Pane_GotFocus(object sender, RoutedEventArgs e)
@@ -370,18 +370,24 @@ private void Pane_GotFocus(object sender, RoutedEventArgs e)
if (ActivePane != activePane)
ActivePane = activePane;
+ if (!IsRightPaneVisible && PaneLeft is not null)
+ {
+ PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 8);
+ return;
+ }
+
// Add theme shadow to the active pane
if (isLeftPane)
{
if (PaneRight is not null)
PaneRight.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 0);
if (PaneLeft is not null)
- PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 8);
+ PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 32);
}
else
{
if (PaneRight is not null)
- PaneRight.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 8);
+ PaneRight.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 32);
if (PaneLeft is not null)
PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 0);
}
From 8e008d9ff0aa7d009cbe8516ba8869543ee2bc82 Mon Sep 17 00:00:00 2001
From: Yair <39923744+yaira2@users.noreply.github.com>
Date: Mon, 27 May 2024 15:16:10 -0700
Subject: [PATCH 04/12] Update PaneHolderPage.xaml.cs
---
src/Files.App/Views/PaneHolderPage.xaml.cs | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/src/Files.App/Views/PaneHolderPage.xaml.cs b/src/Files.App/Views/PaneHolderPage.xaml.cs
index 4f9a2f251996..2f617d685a92 100644
--- a/src/Files.App/Views/PaneHolderPage.xaml.cs
+++ b/src/Files.App/Views/PaneHolderPage.xaml.cs
@@ -347,7 +347,7 @@ private void Pane_Loaded(object sender, RoutedEventArgs e)
((UIElement)sender).GotFocus += Pane_GotFocus;
((UIElement)sender).RightTapped += Pane_RightTapped;
- PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 32);
+ PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 8);
}
private void Pane_GotFocus(object sender, RoutedEventArgs e)
@@ -369,25 +369,19 @@ private void Pane_GotFocus(object sender, RoutedEventArgs e)
var activePane = isLeftPane ? PaneLeft : PaneRight;
if (ActivePane != activePane)
ActivePane = activePane;
-
- if (!IsRightPaneVisible && PaneLeft is not null)
- {
- PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 8);
- return;
- }
-
+
// Add theme shadow to the active pane
if (isLeftPane)
{
if (PaneRight is not null)
PaneRight.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 0);
if (PaneLeft is not null)
- PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 32);
+ PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 8);
}
else
{
if (PaneRight is not null)
- PaneRight.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 32);
+ PaneRight.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 8);
if (PaneLeft is not null)
PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 0);
}
From 5082e85ec27e783dadf8a1cf65b4366e9c4e3bbf Mon Sep 17 00:00:00 2001
From: Yair <39923744+yaira2@users.noreply.github.com>
Date: Mon, 27 May 2024 15:16:36 -0700
Subject: [PATCH 05/12] Update PaneHolderPage.xaml.cs
---
src/Files.App/Views/PaneHolderPage.xaml.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Files.App/Views/PaneHolderPage.xaml.cs b/src/Files.App/Views/PaneHolderPage.xaml.cs
index 2f617d685a92..439db7c9f929 100644
--- a/src/Files.App/Views/PaneHolderPage.xaml.cs
+++ b/src/Files.App/Views/PaneHolderPage.xaml.cs
@@ -369,7 +369,7 @@ private void Pane_GotFocus(object sender, RoutedEventArgs e)
var activePane = isLeftPane ? PaneLeft : PaneRight;
if (ActivePane != activePane)
ActivePane = activePane;
-
+
// Add theme shadow to the active pane
if (isLeftPane)
{
From 0b1c075a111c5b5c7ec442c6e5aba54b4090d6a8 Mon Sep 17 00:00:00 2001
From: Yair <39923744+yaira2@users.noreply.github.com>
Date: Mon, 27 May 2024 18:57:05 -0400
Subject: [PATCH 06/12] Test
---
src/Files.App/Views/Shells/BaseShellPage.cs | 4 +++-
src/Files.App/Views/Shells/ModernShellPage.xaml | 6 ++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/Files.App/Views/Shells/BaseShellPage.cs b/src/Files.App/Views/Shells/BaseShellPage.cs
index d6be7854a443..504206a6b338 100644
--- a/src/Files.App/Views/Shells/BaseShellPage.cs
+++ b/src/Files.App/Views/Shells/BaseShellPage.cs
@@ -144,8 +144,10 @@ public bool IsCurrentInstance
NotifyPropertyChanged(nameof(IsCurrentInstance));
// Update background to show off the focused shell page
- if (!IsColumnView)
+ if (!IsColumnView && PaneHolder.IsMultiPaneActive)
VisualStateManager.GoToState(this, value ? "ShellBackgroundFocusOnState" : "ShellBackgroundFocusOffState", true);
+ else if (!IsColumnView)
+ VisualStateManager.GoToState(this, value ? "ShellBackgroundFocusOnState" : "ShellBackgroundFocusState", true);
}
}
}
diff --git a/src/Files.App/Views/Shells/ModernShellPage.xaml b/src/Files.App/Views/Shells/ModernShellPage.xaml
index e50ec1492dfe..6c2e4b8097e3 100644
--- a/src/Files.App/Views/Shells/ModernShellPage.xaml
+++ b/src/Files.App/Views/Shells/ModernShellPage.xaml
@@ -97,6 +97,12 @@
+
+
+
+
+
+
From a54ade968355d430cbc7262ac06eeb1ba3f30cba Mon Sep 17 00:00:00 2001
From: Yair <39923744+yaira2@users.noreply.github.com>
Date: Mon, 27 May 2024 19:03:14 -0400
Subject: [PATCH 07/12] Revert "Test"
This reverts commit 0b1c075a111c5b5c7ec442c6e5aba54b4090d6a8.
---
src/Files.App/Views/Shells/BaseShellPage.cs | 4 +---
src/Files.App/Views/Shells/ModernShellPage.xaml | 6 ------
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/src/Files.App/Views/Shells/BaseShellPage.cs b/src/Files.App/Views/Shells/BaseShellPage.cs
index 504206a6b338..d6be7854a443 100644
--- a/src/Files.App/Views/Shells/BaseShellPage.cs
+++ b/src/Files.App/Views/Shells/BaseShellPage.cs
@@ -144,10 +144,8 @@ public bool IsCurrentInstance
NotifyPropertyChanged(nameof(IsCurrentInstance));
// Update background to show off the focused shell page
- if (!IsColumnView && PaneHolder.IsMultiPaneActive)
+ if (!IsColumnView)
VisualStateManager.GoToState(this, value ? "ShellBackgroundFocusOnState" : "ShellBackgroundFocusOffState", true);
- else if (!IsColumnView)
- VisualStateManager.GoToState(this, value ? "ShellBackgroundFocusOnState" : "ShellBackgroundFocusState", true);
}
}
}
diff --git a/src/Files.App/Views/Shells/ModernShellPage.xaml b/src/Files.App/Views/Shells/ModernShellPage.xaml
index 6c2e4b8097e3..e50ec1492dfe 100644
--- a/src/Files.App/Views/Shells/ModernShellPage.xaml
+++ b/src/Files.App/Views/Shells/ModernShellPage.xaml
@@ -97,12 +97,6 @@
-
-
-
-
-
-
From 3f533b53115d81c1e736057349e251614c4d11cc Mon Sep 17 00:00:00 2001
From: Yair <39923744+yaira2@users.noreply.github.com>
Date: Tue, 28 May 2024 10:30:22 -0400
Subject: [PATCH 08/12] Update ModernShellPage.xaml
---
.../Views/Shells/ModernShellPage.xaml | 20 +++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/Files.App/Views/Shells/ModernShellPage.xaml b/src/Files.App/Views/Shells/ModernShellPage.xaml
index e50ec1492dfe..e6db67b0b270 100644
--- a/src/Files.App/Views/Shells/ModernShellPage.xaml
+++ b/src/Files.App/Views/Shells/ModernShellPage.xaml
@@ -96,17 +96,33 @@
Navigated="ItemDisplayFrame_Navigated" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
From 3725e1abdda94ca789ccc3d0da21be08c91755f8 Mon Sep 17 00:00:00 2001
From: Yair <39923744+yaira2@users.noreply.github.com>
Date: Tue, 28 May 2024 10:31:07 -0400
Subject: [PATCH 09/12] Update ModernShellPage.xaml
---
src/Files.App/Views/Shells/ModernShellPage.xaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Files.App/Views/Shells/ModernShellPage.xaml b/src/Files.App/Views/Shells/ModernShellPage.xaml
index e6db67b0b270..1174e22821d6 100644
--- a/src/Files.App/Views/Shells/ModernShellPage.xaml
+++ b/src/Files.App/Views/Shells/ModernShellPage.xaml
@@ -113,7 +113,7 @@
-
+
From d2ba2512b115f657fbbdf8b4a35da0fecae3f7e4 Mon Sep 17 00:00:00 2001
From: Yair <39923744+yaira2@users.noreply.github.com>
Date: Tue, 28 May 2024 10:41:46 -0400
Subject: [PATCH 10/12] Update PaneHolderPage.xaml.cs
---
src/Files.App/Views/PaneHolderPage.xaml.cs | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/Files.App/Views/PaneHolderPage.xaml.cs b/src/Files.App/Views/PaneHolderPage.xaml.cs
index 846065442c85..59831b1b2728 100644
--- a/src/Files.App/Views/PaneHolderPage.xaml.cs
+++ b/src/Files.App/Views/PaneHolderPage.xaml.cs
@@ -370,6 +370,9 @@ private void SetShadow()
PaneRight.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 0);
if (PaneLeft is not null)
PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 32);
+
+ VisualStateManager.GoToState(PaneLeft, "ShellBorderFocusOnState", true);
+ VisualStateManager.GoToState(PaneRight, "ShellBorderFocusOffState", true);
}
else
{
@@ -377,10 +380,17 @@ private void SetShadow()
PaneRight.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 32);
if (PaneLeft is not null)
PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 0);
+
+ VisualStateManager.GoToState(PaneRight, "ShellBorderFocusOnState", true);
+ VisualStateManager.GoToState(PaneLeft, "ShellBorderFocusOffState", true);
}
}
else
+ {
PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 8);
+
+ VisualStateManager.GoToState(PaneLeft, "ShellBorderDualPaneOffState", true);
+ }
}
private void Pane_RightTapped(object sender, RoutedEventArgs e)
From 45e1ba0f8be275c74c59c8e99d115db59c2c77bc Mon Sep 17 00:00:00 2001
From: Yair <39923744+yaira2@users.noreply.github.com>
Date: Tue, 28 May 2024 11:02:43 -0400
Subject: [PATCH 11/12] Update PaneHolderPage.xaml.cs
---
src/Files.App/Views/PaneHolderPage.xaml.cs | 25 ++++++----------------
1 file changed, 6 insertions(+), 19 deletions(-)
diff --git a/src/Files.App/Views/PaneHolderPage.xaml.cs b/src/Files.App/Views/PaneHolderPage.xaml.cs
index 59831b1b2728..908836290e20 100644
--- a/src/Files.App/Views/PaneHolderPage.xaml.cs
+++ b/src/Files.App/Views/PaneHolderPage.xaml.cs
@@ -364,26 +364,13 @@ private void SetShadow()
if (IsMultiPaneActive)
{
// Add theme shadow to the active pane
- if (IsLeftPaneActive)
- {
- if (PaneRight is not null)
- PaneRight.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 0);
- if (PaneLeft is not null)
- PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 32);
-
- VisualStateManager.GoToState(PaneLeft, "ShellBorderFocusOnState", true);
- VisualStateManager.GoToState(PaneRight, "ShellBorderFocusOffState", true);
- }
- else
- {
- if (PaneRight is not null)
- PaneRight.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 32);
- if (PaneLeft is not null)
- PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, 0);
+ if (PaneRight is not null)
+ PaneRight.RootGrid.Translation = new System.Numerics.Vector3(0, 0, IsLeftPaneActive ? 0 : 32);
+ if (PaneLeft is not null)
+ PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, IsLeftPaneActive ? 32 : 0);
- VisualStateManager.GoToState(PaneRight, "ShellBorderFocusOnState", true);
- VisualStateManager.GoToState(PaneLeft, "ShellBorderFocusOffState", true);
- }
+ VisualStateManager.GoToState(PaneLeft, IsLeftPaneActive ? "ShellBorderFocusOnState" : "ShellBorderFocusOffState", true);
+ VisualStateManager.GoToState(PaneRight, IsLeftPaneActive ? "ShellBorderFocusOffState" : "ShellBorderFocusOnState", true);
}
else
{
From c63dbb83738e3b836d251c268c67816a5b41c397 Mon Sep 17 00:00:00 2001
From: Yair <39923744+yaira2@users.noreply.github.com>
Date: Tue, 28 May 2024 11:04:53 -0400
Subject: [PATCH 12/12] Update PaneHolderPage.xaml.cs
---
src/Files.App/Views/PaneHolderPage.xaml.cs | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/Files.App/Views/PaneHolderPage.xaml.cs b/src/Files.App/Views/PaneHolderPage.xaml.cs
index 908836290e20..8b12b849d556 100644
--- a/src/Files.App/Views/PaneHolderPage.xaml.cs
+++ b/src/Files.App/Views/PaneHolderPage.xaml.cs
@@ -8,7 +8,6 @@
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Navigation;
using System.Runtime.CompilerServices;
-using Windows.System;
namespace Files.App.Views
{
@@ -365,12 +364,16 @@ private void SetShadow()
{
// Add theme shadow to the active pane
if (PaneRight is not null)
+ {
PaneRight.RootGrid.Translation = new System.Numerics.Vector3(0, 0, IsLeftPaneActive ? 0 : 32);
+ VisualStateManager.GoToState(PaneLeft, IsLeftPaneActive ? "ShellBorderFocusOnState" : "ShellBorderFocusOffState", true);
+ }
+
if (PaneLeft is not null)
+ {
PaneLeft.RootGrid.Translation = new System.Numerics.Vector3(0, 0, IsLeftPaneActive ? 32 : 0);
-
- VisualStateManager.GoToState(PaneLeft, IsLeftPaneActive ? "ShellBorderFocusOnState" : "ShellBorderFocusOffState", true);
- VisualStateManager.GoToState(PaneRight, IsLeftPaneActive ? "ShellBorderFocusOffState" : "ShellBorderFocusOnState", true);
+ VisualStateManager.GoToState(PaneRight, IsLeftPaneActive ? "ShellBorderFocusOffState" : "ShellBorderFocusOnState", true);
+ }
}
else
{