From cbb5400e03ecf846ac31d06bec2a1b24765666e9 Mon Sep 17 00:00:00 2001 From: DB p Date: Wed, 2 Nov 2022 17:08:27 +0900 Subject: [PATCH 01/17] Fix Store Layout for Memory leak --- Flow.Launcher/SettingWindow.xaml | 24 +++++++++--------------- Flow.Launcher/SettingWindow.xaml.cs | 1 + 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 808531765b9..97aad78788f 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -1493,7 +1493,9 @@ FontSize="16" FontWeight="Bold" Text="{Binding Name, Converter={StaticResource TextConverter}}" /> + + @@ -1506,13 +1508,7 @@ - + @@ -1520,7 +1516,9 @@ - + @@ -1598,7 +1593,6 @@ @@ -1656,10 +1650,10 @@ VerticalAlignment="Stretch" Panel.ZIndex="1"> - + - + Date: Wed, 2 Nov 2022 17:34:07 +0900 Subject: [PATCH 02/17] Adjust Images Quality --- Flow.Launcher/SettingWindow.xaml | 13 ++++++++----- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 2 ++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 97aad78788f..53f27729415 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -484,7 +484,6 @@ Width="16" Height="16" Margin="10,4,4,4" - RenderOptions.BitmapScalingMode="HighQuality" Source="/Images/app.png" /> + Style="{DynamicResource PluginListStyle}" + VirtualizingStackPanel.IsVirtualizing="True" + VirtualizingStackPanel.VirtualizationMode="Recycling"> @@ -1477,7 +1478,9 @@ ItemsSource="{Binding ExternalPlugins}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectionMode="Single" - Style="{DynamicResource StoreListStyle}"> + Style="{DynamicResource StoreListStyle}" + VirtualizingStackPanel.IsVirtualizing="True" + VirtualizingStackPanel.VirtualizationMode="Recycling"> @@ -1587,7 +1590,6 @@ Margin="20,20,6,0" HorizontalAlignment="Left" VerticalAlignment="Top" - RenderOptions.BitmapScalingMode="HighQuality" Source="{Binding IcoPath, IsAsync=True}" Stretch="Uniform" /> @@ -1756,7 +1758,8 @@ + ScrollViewer.CanContentScroll="False" + VirtualizingStackPanel.IsVirtualizing="True"> diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index e382c207d45..8920b9b6f9c 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -519,6 +519,8 @@ public Brush PreviewBackground var bitmap = new BitmapImage(); bitmap.BeginInit(); bitmap.StreamSource = memStream; + bitmap.DecodePixelWidth = 800; + bitmap.DecodePixelHeight = 600; bitmap.EndInit(); var brush = new ImageBrush(bitmap) { Stretch = Stretch.UniformToFill }; return brush; From 1f8506aad45e253f1f61e90c7463679aafe3ad47 Mon Sep 17 00:00:00 2001 From: DB p Date: Wed, 2 Nov 2022 20:39:35 +0900 Subject: [PATCH 03/17] Add Virtualizing WrapPanel --- Flow.Launcher/Flow.Launcher.csproj | 3 ++- Flow.Launcher/SettingWindow.xaml | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj index 813a44527be..1e7f70b0a86 100644 --- a/Flow.Launcher/Flow.Launcher.csproj +++ b/Flow.Launcher/Flow.Launcher.csproj @@ -98,6 +98,7 @@ + @@ -120,7 +121,7 @@ - + diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 53f27729415..12eb9c219ea 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -11,6 +11,7 @@ xmlns:ui="http://schemas.modernwpf.com/2019" xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure" xmlns:vm="clr-namespace:Flow.Launcher.ViewModel" + xmlns:wpftk="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel" Title="{DynamicResource flowlauncher_settings}" Width="{Binding SettingWindowWidth, Mode=TwoWay}" Height="{Binding SettingWindowHeight, Mode=TwoWay}" @@ -1051,7 +1052,7 @@ VirtualizingStackPanel.VirtualizationMode="Recycling"> - + @@ -1511,7 +1512,7 @@ - + From 88824763be3966c5d49fb9528c00ed75cd474932 Mon Sep 17 00:00:00 2001 From: DB p Date: Wed, 2 Nov 2022 22:45:28 +0900 Subject: [PATCH 04/17] Adjust VirtualWrappanel --- Flow.Launcher/SettingWindow.xaml | 509 +++++++++++++++---------------- 1 file changed, 251 insertions(+), 258 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 12eb9c219ea..b2a2508de00 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -1402,6 +1402,7 @@ Text="{DynamicResource pluginStore}" TextAlignment="left" /> + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + VerticalAlignment="Top" + Background="#45BD59" + CornerRadius="36" + ToolTip="{DynamicResource LabelUpdateToolTip}" + Visibility="{Binding LabelUpdate, Converter={StaticResource BoolToVisibilityConverter}}" /> + - - - - - - - + + + + - - - - - + + + + + + + + - - + Text="{Binding Description, Mode=OneWay}" /> + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + - - + + + From 3c1451e319000ff3ef118b5f974ef42caf129074 Mon Sep 17 00:00:00 2001 From: DB p Date: Tue, 8 Nov 2022 15:58:17 +0900 Subject: [PATCH 13/17] Change Plugin Store Icon Image Rendermode --- Flow.Launcher/SettingWindow.xaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 668269461b3..1892a62d326 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -1608,6 +1608,7 @@ Height="32" Margin="18,24,0,0" HorizontalAlignment="Left" + RenderOptions.BitmapScalingMode="Fant" Source="{Binding IcoPath, IsAsync=True}" /> Date: Tue, 8 Nov 2022 18:45:58 +0900 Subject: [PATCH 14/17] Remove unused method --- Flow.Launcher/SettingWindow.xaml.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index dfddd137b69..5634bb50709 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -428,9 +428,6 @@ private void RefreshPluginListEventHandler(object sender, RoutedEventArgs e) } } - private void ShowStoreItem_Click(object sender, RoutedEventArgs e) - { - } private void RefreshPluginStoreEventHandler(object sender, RoutedEventArgs e) { if (pluginStoreFilterTxb.Text != lastPluginStoreSearch) From 6e76d87f6636148a209a434718ab70dc085c5a61 Mon Sep 17 00:00:00 2001 From: DB p Date: Tue, 8 Nov 2022 19:34:40 +0900 Subject: [PATCH 15/17] Add VirtualPanel in other scrollviews --- Flow.Launcher/SettingWindow.xaml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 86f740d7872..1ebe69e80f0 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -607,7 +607,8 @@ + ScrollViewer.CanContentScroll="False" + VirtualizingStackPanel.IsVirtualizing="True">