Skip to content

Commit fea2ed3

Browse files
authored
Fix: Fixed issue where progress bar was overlapping text in ongoing operations (#12443)
1 parent f1cb40a commit fea2ed3

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/Files.App/Data/Items/StatusBanner.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ public int Progress
2222
}
2323

2424
private bool isProgressing = false;
25-
2625
public bool IsProgressing
2726
{
2827
get => isProgressing;
29-
set => SetProperty(ref isProgressing, value);
28+
set
29+
{
30+
if (SetProperty(ref isProgressing, value))
31+
OnPropertyChanged(nameof(Message));
32+
}
3033
}
3134

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

4144
public FileOperationType Operation { get; private set; }
4245

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

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

src/Files.App/UserControls/OngoingTasksFlyout.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767

6868
<ProgressBar
6969
x:Name="ProgressBar"
70-
Margin="0,0,12,12"
70+
Margin="0,-24,12,12"
7171
IsIndeterminate="{x:Bind IsCancelled, Mode=OneWay}"
7272
Visibility="{x:Bind IsProgressing, Mode=OneWay}"
7373
Value="{x:Bind Progress, Mode=OneWay}" />

0 commit comments

Comments
 (0)