Skip to content

Fix: Fixed issue where progress bar was overlapping text in ongoing operations #12443

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

Merged
merged 2 commits into from
May 24, 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
14 changes: 11 additions & 3 deletions src/Files.App/Data/Items/StatusBanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ public int Progress
}

private bool isProgressing = false;

public bool IsProgressing
{
get => isProgressing;
set => SetProperty(ref isProgressing, value);
set
{
if (SetProperty(ref isProgressing, value))
OnPropertyChanged(nameof(Message));
}
}

public string Title { get; private set; }
Expand All @@ -40,7 +43,12 @@ public ReturnResult Status

public FileOperationType Operation { get; private set; }

public string Message { get; private set; }
private string message;
public string Message {
// A workaround to avoid overlapping the progress bar (#12362)
get => isProgressing ? message + "\n" : message;
private set => SetProperty(ref message, value);
}

public InfoBarSeverity InfoBarSeverity { get; private set; } = InfoBarSeverity.Informational;

Expand Down
2 changes: 1 addition & 1 deletion src/Files.App/UserControls/OngoingTasksFlyout.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

<ProgressBar
x:Name="ProgressBar"
Margin="0,0,12,12"
Margin="0,-24,12,12"
IsIndeterminate="{x:Bind IsCancelled, Mode=OneWay}"
Visibility="{x:Bind IsProgressing, Mode=OneWay}"
Value="{x:Bind Progress, Mode=OneWay}" />
Expand Down