From a8331af8a7222127dd2022c6cb78b1b51575e9a6 Mon Sep 17 00:00:00 2001 From: DB p Date: Fri, 17 Dec 2021 04:05:17 +0900 Subject: [PATCH 1/3] Adjust Vertical Aligment and margins --- Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs index 384418db9..5cdce2d05 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs @@ -354,7 +354,8 @@ namespace Flow.Launcher.Core.Plugin this.context = context; await InitSettingAsync(); } - private static readonly Thickness settingControlMargin = new(10); + private static readonly Thickness settingControlMargin = new(10, 3, 10, 3); + private static readonly Thickness settingPanelMargin = new(15, 20, 15, 20); private JsonRpcConfigurationModel _settingsTemplate; public Control CreateSettingPanel() { @@ -363,7 +364,7 @@ namespace Flow.Launcher.Core.Plugin var settingWindow = new UserControl(); var mainPanel = new StackPanel { - Margin = settingControlMargin, + Margin = settingPanelMargin, Orientation = Orientation.Vertical }; settingWindow.Content = mainPanel; @@ -378,6 +379,7 @@ namespace Flow.Launcher.Core.Plugin var name = new Label() { Content = attribute.Label, + VerticalAlignment = VerticalAlignment.Center, Margin = settingControlMargin }; @@ -391,7 +393,7 @@ namespace Flow.Launcher.Core.Plugin { Text = attribute.Description.Replace("\\r\\n", "\r\n"), Margin = settingControlMargin, - MaxWidth = 400, + MaxWidth = 500, TextWrapping = TextWrapping.WrapWithOverflow }; break; From 31ce34bac66a70e8991f6503c155b087b7d8bd53 Mon Sep 17 00:00:00 2001 From: DB p Date: Fri, 17 Dec 2021 11:06:31 +0900 Subject: [PATCH 2/3] Adjust TextBlock Margin --- Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs index 5cdce2d05..6c28b4732 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs @@ -354,8 +354,9 @@ namespace Flow.Launcher.Core.Plugin this.context = context; await InitSettingAsync(); } - private static readonly Thickness settingControlMargin = new(10, 3, 10, 3); + private static readonly Thickness settingControlMargin = new(10, 4, 10, 4); private static readonly Thickness settingPanelMargin = new(15, 20, 15, 20); + private static readonly Thickness settingTextBlockMargin = new(-10, 0, 0, 0); private JsonRpcConfigurationModel _settingsTemplate; public Control CreateSettingPanel() { @@ -379,6 +380,7 @@ namespace Flow.Launcher.Core.Plugin var name = new Label() { Content = attribute.Label, + MinWidth = 0, VerticalAlignment = VerticalAlignment.Center, Margin = settingControlMargin }; @@ -392,7 +394,8 @@ namespace Flow.Launcher.Core.Plugin contentControl = new TextBlock { Text = attribute.Description.Replace("\\r\\n", "\r\n"), - Margin = settingControlMargin, + Margin = settingTextBlockMargin, + LineHeight = 20, MaxWidth = 500, TextWrapping = TextWrapping.WrapWithOverflow }; From a05f2bb92bad70c06008ec0c39eb4ec9f7ee7e56 Mon Sep 17 00:00:00 2001 From: DB p Date: Fri, 17 Dec 2021 11:25:41 +0900 Subject: [PATCH 3/3] Adjust Control Aligment --- Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs index 6c28b4732..4cfa83382 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs @@ -356,7 +356,7 @@ namespace Flow.Launcher.Core.Plugin } private static readonly Thickness settingControlMargin = new(10, 4, 10, 4); private static readonly Thickness settingPanelMargin = new(15, 20, 15, 20); - private static readonly Thickness settingTextBlockMargin = new(-10, 0, 0, 0); + private static readonly Thickness settingTextBlockMargin = new(10, 4, 10, 4); private JsonRpcConfigurationModel _settingsTemplate; public Control CreateSettingPanel() { @@ -377,12 +377,13 @@ namespace Flow.Launcher.Core.Plugin Orientation = Orientation.Horizontal, Margin = settingControlMargin }; - var name = new Label() + var name = new TextBlock() { - Content = attribute.Label, - MinWidth = 0, + Text = attribute.Label, + Width = 120, VerticalAlignment = VerticalAlignment.Center, - Margin = settingControlMargin + Margin = settingControlMargin, + TextWrapping = TextWrapping.WrapWithOverflow }; FrameworkElement contentControl; @@ -395,7 +396,6 @@ namespace Flow.Launcher.Core.Plugin { Text = attribute.Description.Replace("\\r\\n", "\r\n"), Margin = settingTextBlockMargin, - LineHeight = 20, MaxWidth = 500, TextWrapping = TextWrapping.WrapWithOverflow };