Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Fixed issue with resizing the status column #11027

Merged
merged 14 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Files.App/Shell/Win32Shell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static Win32Shell()

if ((controlPanel.PIDL.IsParentOf(shellFolder.PIDL, false) ||
controlPanelCategoryView.PIDL.IsParentOf(shellFolder.PIDL, false)) &&
!shellFolder.Any())
(shellFolder is null || !shellFolder.Any()))
{
// Return null to force open unsupported items in explorer
// only if inside control panel and folder appears empty
Expand Down
13 changes: 7 additions & 6 deletions src/Files.App/ViewModels/ColumnsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,11 @@ public bool IsHidden
[LiteDB.BsonIgnore]
public double MaxLength
{
get => IsHidden || UserCollapsed ? 0 : NormalMaxLength;
get => UserCollapsed ? 0 : NormalMaxLength;
}

private double normalMaxLength = 800;

[LiteDB.BsonIgnore]
public double NormalMaxLength
{
get => normalMaxLength;
Expand All @@ -212,10 +211,10 @@ public double NormalMinLength
}

[LiteDB.BsonIgnore]
public double MinLength => IsHidden || UserCollapsed ? 0 : NormalMinLength;
public double MinLength => UserCollapsed ? 0 : NormalMinLength;

[LiteDB.BsonIgnore]
public Visibility Visibility => IsHidden || UserCollapsed ? Visibility.Collapsed : Visibility.Visible;
public Visibility Visibility => UserCollapsed ? Visibility.Collapsed : Visibility.Visible;

private bool userCollapsed;

Expand All @@ -232,15 +231,15 @@ public bool UserCollapsed
[LiteDB.BsonIgnore]
public GridLength Length
{
get => IsHidden || UserCollapsed ? new GridLength(0) : UserLength;
get => UserCollapsed ? new GridLength(0) : UserLength;
}

private const int gridSplitterWidth = 12;

[LiteDB.BsonIgnore]
public GridLength LengthIncludingGridSplitter
{
get => IsHidden || UserCollapsed ? new GridLength(0) : new GridLength(UserLength.Value + (IsResizeable ? gridSplitterWidth : 0));
get => UserCollapsed ? new GridLength(0) : new GridLength(UserLength.Value + (IsResizeable ? gridSplitterWidth : 0));
}

[LiteDB.BsonIgnore]
Expand Down Expand Up @@ -270,12 +269,14 @@ public double UserLengthPixels

public void Hide()
{
UserCollapsed = true;
IsHidden = true;
UpdateVisibility();
}

public void Show()
{
UserCollapsed = false;
IsHidden = false;
UpdateVisibility();
}
Expand Down