Skip to content

Commit 8b9626c

Browse files
authored
Feature: Automatically hide the preview pane when the window is too small (#12499)
1 parent 522c3ec commit 8b9626c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Files.App/ResourceDictionaries/PathIcons.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -988,8 +988,8 @@
988988
<VisualState x:Name="Normal" />
989989
<VisualState x:Name="Selected">
990990
<VisualState.Setters>
991-
<Setter Target="Path1.Fill" Value="{ThemeResource TextOnAccentFillColorPrimaryBrush}" />
992-
<Setter Target="Path2.Fill" Value="Transparent" />
991+
<Setter Target="Path1.Fill" Value="Transparent" />
992+
<Setter Target="Path2.Fill" Value="{ThemeResource TextOnAccentFillColorPrimaryBrush}" />
993993
<Setter Target="Path3.Fill" Value="{ThemeResource TextOnAccentFillColorPrimaryBrush}" />
994994
</VisualState.Setters>
995995
</VisualState>

src/Files.App/Views/MainPage.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ public bool ShouldPreviewPaneBeDisplayed
489489
{
490490
var isHomePage = !(SidebarAdaptiveViewModel.PaneHolder?.ActivePane?.InstanceViewModel?.IsPageTypeNotHome ?? false);
491491
var isMultiPane = SidebarAdaptiveViewModel.PaneHolder?.IsMultiPaneActive ?? false;
492-
var isBigEnough = App.Window.Bounds.Width > 450 && App.Window.Bounds.Height > 400;
492+
var isBigEnough = App.Window.Bounds.Width > 450 && App.Window.Bounds.Height > 450 || RootGrid.ActualWidth > 700 && App.Window.Bounds.Height > 360;
493493
var isEnabled = (!isHomePage || isMultiPane) && isBigEnough;
494494

495495
return isEnabled;

0 commit comments

Comments
 (0)