Skip to content

Commit 8522d78

Browse files
authored
Merge pull request #3544 from Flow-Launcher/width-issue
Fix size changed width issue
2 parents a75553f + 8325963 commit 8522d78

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,9 @@ private void ListView_SizeChanged(object sender, SizeChangedEventArgs e)
432432

433433
var workingWidth =
434434
listView.ActualWidth - SystemParameters.VerticalScrollBarWidth; // take into account vertical scrollbar
435+
436+
if (workingWidth <= 0) return;
437+
435438
var col1 = 0.25;
436439
var col2 = 0.15;
437440
var col3 = 0.60;

Plugins/Flow.Launcher.Plugin.Sys/SysSettings.xaml.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,15 @@ private void ListView_SizeChanged(object sender, SizeChangedEventArgs e)
2121
ListView listView = sender as ListView;
2222
GridView gView = listView.View as GridView;
2323

24-
var workingWidth = listView.ActualWidth - SystemParameters.VerticalScrollBarWidth; // take into account vertical scrollbar
24+
var workingWidth =
25+
listView.ActualWidth - SystemParameters.VerticalScrollBarWidth; // take into account vertical scrollbar
26+
27+
if (workingWidth <= 0) return;
28+
2529
var col1 = 0.2;
2630
var col2 = 0.6;
2731
var col3 = 0.2;
2832

29-
if (workingWidth <= 0)
30-
{
31-
return;
32-
}
33-
3433
gView.Columns[0].Width = workingWidth * col1;
3534
gView.Columns[1].Width = workingWidth * col2;
3635
gView.Columns[2].Width = workingWidth * col3;

0 commit comments

Comments
 (0)