Fix dev Merge / Adjust Button Size

This commit is contained in:
DB p 2021-12-05 21:44:41 +09:00
parent a5e0d23e0a
commit e79f80514b
2 changed files with 155 additions and 125 deletions

View file

@ -39,6 +39,8 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public string ResultFontWeight { get; set; }
public string ResultFontStretch { get; set; }
public bool UseGlyphIcons { get; set; } = true;
public bool UseAnimation { get; set; } = true;
public bool UseSound { get; set; } = true;
public int CustomExplorerIndex { get; set; } = 0;

View file

@ -1,77 +1,91 @@
<Window x:Class="Flow.Launcher.SelectBrowserWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Flow.Launcher"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
Title="{DynamicResource defaultBrowserTitle}"
Background="#f3f3f3"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Window
x:Class="Flow.Launcher.SelectBrowserWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Flow.Launcher"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
Title="{DynamicResource defaultBrowserTitle}"
Background="#f3f3f3"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Grid Width="530">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="80" />
</Grid.RowDefinitions>
<Border Padding="26,26,26,0"
Background="#ffffff"
BorderBrush="#e5e5e5"
BorderThickness="0,0,0,1">
<Border
Padding="26,26,26,0"
Background="#ffffff"
BorderBrush="#e5e5e5"
BorderThickness="0,0,0,1">
<Grid>
<StackPanel>
<StackPanel Grid.Row="0" Margin="0,0,0,12">
<TextBlock Grid.Column="0"
Margin="0,0,0,0"
FontFamily="Segoe UI"
FontSize="20"
FontWeight="SemiBold"
Text="{DynamicResource defaultBrowserTitle}"
TextAlignment="Left" />
<TextBlock
Grid.Column="0"
Margin="0,0,0,0"
FontFamily="Segoe UI"
FontSize="20"
FontWeight="SemiBold"
Text="{DynamicResource defaultBrowserTitle}"
TextAlignment="Left" />
</StackPanel>
<StackPanel>
<TextBlock FontSize="14"
Foreground="#1b1b1b"
Text="{DynamicResource defaultBrowser_tips}"
TextAlignment="Left"
TextWrapping="WrapWithOverflow" />
<TextBlock
FontSize="14"
Foreground="#1b1b1b"
Text="{DynamicResource defaultBrowser_tips}"
TextAlignment="Left"
TextWrapping="WrapWithOverflow" />
</StackPanel>
<StackPanel Margin="14,28,0,0" Orientation="Horizontal">
<TextBlock Grid.Column="1"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource defaultBrowser_name}" />
<ComboBox Name="comboBox"
Width="200"
Height="35"
Margin="14,0,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
ItemsSource="{Binding CustomBrowsers}"
SelectedIndex="{Binding SelectedCustomBrowserIndex}">
<TextBlock
Grid.Column="1"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource defaultBrowser_name}" />
<ComboBox
Name="comboBox"
Width="200"
Height="35"
Margin="14,0,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
ItemsSource="{Binding CustomBrowsers}"
SelectedIndex="{Binding SelectedCustomBrowserIndex}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<Button Margin="10,0,0,0" Click="btnAdd_Click" Content="{DynamicResource add}" />
<Button Margin="10,0,0,0"
Click="btnDelete_Click"
Content="{DynamicResource delete}"
IsEnabled="{Binding CustomExplorer.Editable}" />
<Button
Margin="10,0,0,0"
Click="btnAdd_Click"
Content="{DynamicResource add}" />
<Button
Margin="10,0,0,0"
Click="btnDelete_Click"
Content="{DynamicResource delete}"
IsEnabled="{Binding CustomExplorer.Editable}" />
</StackPanel>
<Rectangle Height="1" Margin="0,20,0,12" Fill="#cecece" />
<StackPanel Margin="0,0,0,0"
HorizontalAlignment="Stretch"
DataContext="{Binding CustomExplorer}"
Orientation="Horizontal">
<Rectangle
Height="1"
Margin="0,20,0,12"
Fill="#cecece" />
<StackPanel
Margin="0,0,0,0"
HorizontalAlignment="Stretch"
DataContext="{Binding CustomExplorer}"
Orientation="Horizontal">
<Grid Width="480">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150" />
@ -83,88 +97,102 @@
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
Grid.Column="0"
Margin="14,5,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource defaultBrowser_profile_name}" />
<TextBox x:Name="ProfileTextBox"
Grid.Row="0"
Grid.Column="1"
Width="Auto"
Margin="10,5,15,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
IsEnabled="{Binding Editable}"
Text="{Binding Name}" />
<TextBlock Grid.Row="1"
Grid.Column="0"
Margin="14,10,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource defaultBrowser_path}" />
<TextBox x:Name="PathTextBox"
Grid.Row="1"
Grid.Column="1"
Width="Auto"
Margin="10,10,15,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
IsEnabled="{Binding Editable}"
Text="{Binding Path}" />
<StackPanel Grid.Row="2"
Grid.Column="1"
Margin="14,10,14,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock
Grid.Row="0"
Grid.Column="0"
Margin="14,5,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource defaultBrowser_profile_name}" />
<TextBox
x:Name="ProfileTextBox"
Grid.Row="0"
Grid.Column="1"
Width="Auto"
Margin="10,5,15,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
IsEnabled="{Binding Editable}"
Text="{Binding Name}" />
<TextBlock
Grid.Row="1"
Grid.Column="0"
Margin="14,10,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource defaultBrowser_path}" />
<TextBox
x:Name="PathTextBox"
Grid.Row="1"
Grid.Column="1"
Width="Auto"
Margin="10,10,15,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
IsEnabled="{Binding Editable}"
Text="{Binding Path}" />
<StackPanel
Grid.Row="2"
Grid.Column="1"
Margin="14,10,14,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Orientation="Horizontal">
<RadioButton GroupName="browser" IsChecked="True">New Tab</RadioButton>
<RadioButton GroupName="browser">New Window</RadioButton>
</StackPanel>
<TextBlock Grid.Row="3"
Grid.Column="0"
Margin="14,10,0,20"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource defaultBrowser_parameter}" />
<StackPanel Grid.Row="3"
Grid.Column="1"
Margin="0,10,0,15"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Orientation="Horizontal">
<TextBox x:Name="fileArgTextBox"
Width="180"
Margin="10,0,0,0"
IsEnabled="{Binding Editable}"
Text="{Binding PrivateArg}" />
<CheckBox Margin="12,0,0,0" VerticalAlignment="Center" IsChecked="{Binding EnablePrivate}" />
<TextBlock
Grid.Row="3"
Grid.Column="0"
Margin="14,10,0,20"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource defaultBrowser_parameter}" />
<StackPanel
Grid.Row="3"
Grid.Column="1"
Margin="0,10,0,15"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Orientation="Horizontal">
<TextBox
x:Name="fileArgTextBox"
Width="180"
Margin="10,0,0,0"
IsEnabled="{Binding Editable}"
Text="{Binding PrivateArg}" />
<CheckBox
Margin="12,0,0,0"
VerticalAlignment="Center"
IsChecked="{Binding EnablePrivate}" />
</StackPanel>
</Grid>
</StackPanel>
</StackPanel>
</Grid>
</Border>
<StackPanel Grid.Row="1" HorizontalAlignment="Center" Orientation="Horizontal">
<Button x:Name="btnCancel"
Width="100"
Height="30"
Margin="0,0,5,0"
Click="btnCancel_Click"
Content="{DynamicResource cancel}" />
<Button x:Name="btnDone"
Width="100"
Height="30"
Margin="5,0,0,0"
Click="btnDone_Click"
Content="{DynamicResource done}"
ForceCursor="True">
<StackPanel
Grid.Row="1"
HorizontalAlignment="Center"
Orientation="Horizontal">
<Button
x:Name="btnCancel"
Width="145"
Margin="0,0,5,0"
Click="btnCancel_Click"
Content="{DynamicResource cancel}" />
<Button
x:Name="btnDone"
Width="145"
Margin="5,0,0,0"
Click="btnDone_Click"
Content="{DynamicResource done}"
ForceCursor="True">
<Button.Style>
<Style BasedOn="{StaticResource DefaultButtonStyle}" TargetType="{x:Type Button}">
<Style BasedOn="{StaticResource AccentButtonStyle}" TargetType="{x:Type Button}">
<Style.Triggers>
<DataTrigger Binding="{Binding Text.Length, ElementName=ProfileTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0">
<Setter Property="IsEnabled" Value="False" />