Flow.Launcher/Plugins/Flow.Launcher.Plugin.Sys/SysSettings.xaml.cs
DB p b1768b5abf - Adjust JsonRPCplugin Panel Layout
- Adjust System Plugin Setting Panel Margin
2022-12-09 17:46:35 +09:00

31 lines
947 B
C#

using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
namespace Flow.Launcher.Plugin.Sys
{
public partial class SysSettings : UserControl
{
public SysSettings(List<Result> Results)
{
InitializeComponent();
foreach (var Result in Results)
{
lbxCommands.Items.Add(Result);
}
}
private void ListView_SizeChanged(object sender, SizeChangedEventArgs e)
{
ListView listView = sender as ListView;
GridView gView = listView.View as GridView;
var workingWidth = listView.ActualWidth - SystemParameters.VerticalScrollBarWidth; // take into account vertical scrollbar
var col1 = 0.3;
var col2 = 0.7;
gView.Columns[0].Width = workingWidth * col1;
gView.Columns[1].Width = workingWidth * col2;
}
}
}