mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Unify text area min width & height
This commit is contained in:
parent
bc7f4fe384
commit
af3a1a310c
3 changed files with 26 additions and 21 deletions
|
|
@ -29,8 +29,10 @@ namespace Flow.Launcher.Core.Plugin
|
|||
private static readonly Thickness SettingPanelItemLeftMargin = (Thickness)Application.Current.FindResource("SettingPanelItemLeftMargin");
|
||||
private static readonly Thickness SettingPanelItemTopBottomMargin = (Thickness)Application.Current.FindResource("SettingPanelItemTopBottomMargin");
|
||||
private static readonly Thickness SettingPanelItemLeftTopBottomMargin = (Thickness)Application.Current.FindResource("SettingPanelItemLeftTopBottomMargin");
|
||||
private static readonly double SettingPanelTextBlockMinWidth = (double)Application.Current.FindResource("SettingPanelTextBlockMinWidth");
|
||||
private static readonly double SettingPanelPathTextBlockMinWidth = (double)Application.Current.FindResource("SettingPanelPathTextBlockMinWidth");
|
||||
private static readonly double SettingPanelTextBoxMinWidth = (double)Application.Current.FindResource("SettingPanelTextBoxMinWidth");
|
||||
private static readonly double SettingPanelPathTextBoxMinWidth = (double)Application.Current.FindResource("SettingPanelPathTextBoxMinWidth");
|
||||
private static readonly double SettingPanelAreaTextBoxMinWidth = (double)Application.Current.FindResource("SettingPanelAreaTextBoxMinWidth");
|
||||
private static readonly double SettingPanelAreaTextBoxMinHeight = (double)Application.Current.FindResource("SettingPanelAreaTextBoxMinHeight");
|
||||
|
||||
public async Task InitializeAsync()
|
||||
{
|
||||
|
|
@ -229,7 +231,7 @@ namespace Flow.Launcher.Core.Plugin
|
|||
VerticalAlignment = VerticalAlignment.Center,
|
||||
Margin = SettingPanelItemTopBottomMargin,
|
||||
TextAlignment = TextAlignment.Left,
|
||||
TextWrapping = TextWrapping.Wrap // TODO: Check password and others
|
||||
TextWrapping = TextWrapping.Wrap
|
||||
};
|
||||
|
||||
break;
|
||||
|
|
@ -238,7 +240,7 @@ namespace Flow.Launcher.Core.Plugin
|
|||
{
|
||||
var textBox = new TextBox()
|
||||
{
|
||||
MinWidth = SettingPanelTextBlockMinWidth,
|
||||
MinWidth = SettingPanelTextBoxMinWidth,
|
||||
HorizontalAlignment = HorizontalAlignment.Left,
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
Margin = SettingPanelItemLeftTopBottomMargin,
|
||||
|
|
@ -260,7 +262,7 @@ namespace Flow.Launcher.Core.Plugin
|
|||
{
|
||||
var textBox = new TextBox()
|
||||
{
|
||||
MinWidth = SettingPanelPathTextBlockMinWidth,
|
||||
MinWidth = SettingPanelPathTextBoxMinWidth,
|
||||
HorizontalAlignment = HorizontalAlignment.Left,
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
Margin = SettingPanelItemLeftMargin,
|
||||
|
|
@ -325,8 +327,8 @@ namespace Flow.Launcher.Core.Plugin
|
|||
{
|
||||
var textBox = new TextBox()
|
||||
{
|
||||
MinHeight = 150,
|
||||
MinWidth = 240,
|
||||
MinHeight = SettingPanelAreaTextBoxMinHeight,
|
||||
MinWidth = SettingPanelAreaTextBoxMinWidth,
|
||||
HorizontalAlignment = HorizontalAlignment.Left,
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
Margin = SettingPanelItemLeftTopBottomMargin,
|
||||
|
|
@ -349,15 +351,16 @@ namespace Flow.Launcher.Core.Plugin
|
|||
{
|
||||
var passwordBox = new PasswordBox()
|
||||
{
|
||||
MinWidth = SettingPanelTextBlockMinWidth,
|
||||
MinWidth = SettingPanelTextBoxMinWidth,
|
||||
HorizontalAlignment = HorizontalAlignment.Left,
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
Margin = SettingPanelItemLeftTopBottomMargin,
|
||||
Password = Settings[attributes.Name] as string ?? string.Empty,
|
||||
PasswordChar = attributes.passwordChar == default ? '*' : attributes.passwordChar,
|
||||
ToolTip = attributes.Description
|
||||
ToolTip = attributes.Description,
|
||||
};
|
||||
|
||||
// TODO: Fix issue here
|
||||
passwordBox.PasswordChanged += (sender, _) =>
|
||||
{
|
||||
Settings[attributes.Name] = ((PasswordBox)sender).Password;
|
||||
|
|
|
|||
|
|
@ -5603,6 +5603,8 @@
|
|||
<Setter Property="Background" Value="{DynamicResource Color03B}" />
|
||||
</Style>
|
||||
|
||||
<system:Double x:Key="SettingPanelTextBlockMinWidth">180</system:Double>
|
||||
<system:Double x:Key="SettingPanelPathTextBlockMinWidth">240</system:Double>
|
||||
<system:Double x:Key="SettingPanelTextBoxMinWidth">180</system:Double>
|
||||
<system:Double x:Key="SettingPanelPathTextBoxMinWidth">240</system:Double>
|
||||
<system:Double x:Key="SettingPanelAreaTextBoxMinWidth">270</system:Double>
|
||||
<system:Double x:Key="SettingPanelAreaTextBoxMinHeight">150</system:Double>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@
|
|||
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}"
|
||||
Orientation="Horizontal">
|
||||
<TextBox
|
||||
MinWidth="{StaticResource SettingPanelPathTextBlockMinWidth}"
|
||||
MinWidth="{StaticResource SettingPanelPathTextBoxMinWidth}"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding FileEditorPath}"
|
||||
|
|
@ -200,7 +200,7 @@
|
|||
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}"
|
||||
Orientation="Horizontal">
|
||||
<TextBox
|
||||
MinWidth="{StaticResource SettingPanelPathTextBlockMinWidth}"
|
||||
MinWidth="{StaticResource SettingPanelPathTextBoxMinWidth}"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding FolderEditorPath}"
|
||||
|
|
@ -226,7 +226,7 @@
|
|||
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}"
|
||||
Orientation="Horizontal">
|
||||
<TextBox
|
||||
MinWidth="{StaticResource SettingPanelPathTextBlockMinWidth}"
|
||||
MinWidth="{StaticResource SettingPanelPathTextBoxMinWidth}"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding ShellPath}"
|
||||
|
|
@ -296,7 +296,7 @@
|
|||
<TextBox
|
||||
Grid.Row="9"
|
||||
Grid.Column="1"
|
||||
MinWidth="{StaticResource SettingPanelTextBlockMinWidth}"
|
||||
MinWidth="{StaticResource SettingPanelTextBoxMinWidth}"
|
||||
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding ExcludedFileTypes}"
|
||||
|
|
@ -311,7 +311,7 @@
|
|||
<TextBox
|
||||
Grid.Row="10"
|
||||
Grid.Column="1"
|
||||
MinWidth="{StaticResource SettingPanelTextBlockMinWidth}"
|
||||
MinWidth="{StaticResource SettingPanelTextBoxMinWidth}"
|
||||
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
|
|
@ -358,8 +358,8 @@
|
|||
Grid.Row="15"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
MinWidth="240"
|
||||
MinHeight="150"
|
||||
MinWidth="{StaticResource SettingPanelAreaTextBoxMinWidth}"
|
||||
MinHeight="{StaticResource SettingPanelAreaTextBoxMinHeight}"
|
||||
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
|
||||
HorizontalAlignment="Left"
|
||||
AcceptsReturn="True"
|
||||
|
|
@ -378,8 +378,8 @@
|
|||
Grid.Row="17"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
MinWidth="240"
|
||||
MinHeight="150"
|
||||
MinWidth="{StaticResource SettingPanelAreaTextBoxMinWidth}"
|
||||
MinHeight="{StaticResource SettingPanelAreaTextBoxMinHeight}"
|
||||
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
|
||||
HorizontalAlignment="Left"
|
||||
AcceptsReturn="True"
|
||||
|
|
@ -526,7 +526,7 @@
|
|||
<TextBox
|
||||
Grid.Row="26"
|
||||
Grid.Column="1"
|
||||
MinWidth="{StaticResource SettingPanelPathTextBlockMinWidth}"
|
||||
MinWidth="{StaticResource SettingPanelPathTextBoxMinWidth}"
|
||||
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding EverythingInstalledPath}" />
|
||||
|
|
|
|||
Loading…
Reference in a new issue