Skip to content

Commit cf0d499

Browse files
authored
Feature: Don't show checkbox when no items are selected (#11961)
1 parent c3ee61f commit cf0d499

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Files.App/Views/LayoutModes/DetailsLayoutBrowser.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ private void UpdateCheckboxVisibility(object sender, bool? isPointerOver = null)
819819
if (isPointerOver.HasValue)
820820
control.SetValue(IsPointerOverProperty, isPointerOver);
821821
// Handle visual states
822-
if (control.IsSelected || control.GetValue(IsPointerOverProperty) is not false)
822+
if (control.IsSelected || control.GetValue(IsPointerOverProperty) is not false && SelectedItems?.Count >= 1)
823823
VisualStateManager.GoToState(userControl, "ShowCheckbox", true);
824824
else
825825
VisualStateManager.GoToState(userControl, "HideCheckbox", true);

src/Files.App/Views/LayoutModes/GridViewBrowser.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ private void UpdateCheckboxVisibility(object sender, bool? isPointerOver = null)
510510
if (isPointerOver.HasValue)
511511
control.SetValue(IsPointerOverProperty, isPointerOver);
512512
// Handle visual states
513-
if (control.IsSelected || control.GetValue(IsPointerOverProperty) is not false)
513+
if (control.IsSelected || control.GetValue(IsPointerOverProperty) is not false && SelectedItems?.Count >= 1)
514514
VisualStateManager.GoToState(userControl, "ShowCheckbox", true);
515515
else
516516
VisualStateManager.GoToState(userControl, "HideCheckbox", true);

0 commit comments

Comments
 (0)