reflow to vertical (#6)
Reviewed-on: #6 Co-authored-by: Aleksandr Neychev <alexnejchev73@gmail.com>
This commit was merged in pull request #6.
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DataContext="{d:DesignInstance Type=vm:SettingsViewModel}"
|
d:DataContext="{d:DesignInstance Type=vm:SettingsViewModel}"
|
||||||
Title="{Binding Title}"
|
Title="{Binding Title}"
|
||||||
Width="1000" SizeToContent="Height" MaxHeight="900"
|
Width="560" SizeToContent="Height" MaxHeight="940"
|
||||||
ResizeMode="CanMinimize"
|
ResizeMode="CanMinimize"
|
||||||
Background="{DynamicResource Theme.WindowBackground}"
|
Background="{DynamicResource Theme.WindowBackground}"
|
||||||
Foreground="{DynamicResource Theme.Foreground}">
|
Foreground="{DynamicResource Theme.Foreground}">
|
||||||
@@ -59,19 +59,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
|
|
||||||
<!-- The settings are laid out in two columns: this way the window fits on the
|
|
||||||
screen entirely and does without scrolling. Scrolling is kept for the case of
|
|
||||||
a large system font, with which the content is taller than the monitor after all.
|
|
||||||
|
|
||||||
The left column holds what the popup does; the right one holds the single
|
|
||||||
section describing how and where the popup looks -->
|
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" Padding="16">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" Padding="16">
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
|
|
||||||
<GroupBox Header="{Binding Localization[SectionInterface]}">
|
<GroupBox Header="{Binding Localization[SectionInterface]}">
|
||||||
@@ -104,105 +92,6 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<GroupBox Header="{Binding Localization[SectionBehavior]}">
|
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="164" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<TextBlock Style="{StaticResource FieldLabel}"
|
|
||||||
Text="{Binding Localization[DurationLabel]}" />
|
|
||||||
<Slider Grid.Column="1" Minimum="200" Maximum="5000" TickFrequency="100"
|
|
||||||
Value="{Binding Settings.DurationMilliseconds}" />
|
|
||||||
<StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center">
|
|
||||||
<TextBlock Style="{StaticResource FieldValue}"
|
|
||||||
Text="{Binding Settings.DurationMilliseconds, StringFormat={}{0:F0}}" />
|
|
||||||
<TextBlock Margin="4,0,0,0"
|
|
||||||
Foreground="{DynamicResource Theme.SecondaryForeground}"
|
|
||||||
Text="{Binding Localization[MillisecondsSuffix]}" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<TextBlock Grid.Row="1" Margin="0,12,12,0"
|
|
||||||
Style="{StaticResource FieldLabel}"
|
|
||||||
Text="{Binding Localization[CapsLockLabel]}" />
|
|
||||||
<CheckBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Margin="0,12,0,0"
|
|
||||||
IsChecked="{Binding Settings.UseCapsLockHotkey}"
|
|
||||||
Content="{Binding Localization[CapsLockHotkeyCheck]}" />
|
|
||||||
|
|
||||||
<TextBlock Grid.Row="2" Margin="0,12,12,0"
|
|
||||||
Style="{StaticResource FieldLabel}"
|
|
||||||
Text="{Binding Localization[CapsLockHoldLabel]}" />
|
|
||||||
<Slider Grid.Row="2" Grid.Column="1" Margin="0,12,0,0"
|
|
||||||
Minimum="150" Maximum="1500" TickFrequency="50"
|
|
||||||
Value="{Binding Settings.CapsLockHoldMilliseconds}"
|
|
||||||
IsEnabled="{Binding Settings.UseCapsLockHotkey}" />
|
|
||||||
<StackPanel Grid.Row="2" Grid.Column="2" Margin="0,12,0,0"
|
|
||||||
Orientation="Horizontal" VerticalAlignment="Center">
|
|
||||||
<TextBlock Style="{StaticResource FieldValue}"
|
|
||||||
Text="{Binding Settings.CapsLockHoldMilliseconds, StringFormat={}{0:F0}}" />
|
|
||||||
<TextBlock Margin="4,0,0,0"
|
|
||||||
Foreground="{DynamicResource Theme.SecondaryForeground}"
|
|
||||||
Text="{Binding Localization[MillisecondsSuffix]}" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<TextBlock Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2"
|
|
||||||
Margin="0,6,0,0" TextWrapping="Wrap"
|
|
||||||
Foreground="{DynamicResource Theme.SecondaryForeground}">
|
|
||||||
<Run Text="{Binding Localization[CapsLockHoldHint], Mode=OneWay}" />
|
|
||||||
<InlineUIContainer BaselineAlignment="Baseline">
|
|
||||||
<!-- The elevation caveat lives in the tooltip to keep the section compact -->
|
|
||||||
<TextBlock Text="{Binding Localization[MoreInfoLink]}"
|
|
||||||
Foreground="{DynamicResource Theme.Accent}"
|
|
||||||
TextDecorations="Underline"
|
|
||||||
Cursor="Help"
|
|
||||||
ToolTipService.InitialShowDelay="200"
|
|
||||||
ToolTipService.ShowDuration="60000"
|
|
||||||
Visibility="{Binding Settings.UseCapsLockHotkey, Converter={StaticResource BooleanToVisibility}}">
|
|
||||||
<TextBlock.ToolTip>
|
|
||||||
<ToolTip>
|
|
||||||
<TextBlock TextWrapping="Wrap"
|
|
||||||
Text="{Binding Localization[CapsLockElevationHint]}" />
|
|
||||||
</ToolTip>
|
|
||||||
</TextBlock.ToolTip>
|
|
||||||
</TextBlock>
|
|
||||||
</InlineUIContainer>
|
|
||||||
</TextBlock>
|
|
||||||
|
|
||||||
<TextBlock Grid.Row="4" Margin="0,12,12,0"
|
|
||||||
Style="{StaticResource FieldLabel}"
|
|
||||||
Visibility="{Binding IsStartupAvailable, Converter={StaticResource BooleanToVisibility}}"
|
|
||||||
Text="{Binding Localization[StartupLabel]}" />
|
|
||||||
<CheckBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" Margin="0,12,0,0"
|
|
||||||
Visibility="{Binding IsStartupAvailable, Converter={StaticResource BooleanToVisibility}}"
|
|
||||||
IsEnabled="{Binding CanChangeStartup}"
|
|
||||||
IsChecked="{Binding RunAtStartup}"
|
|
||||||
Content="{Binding Localization[StartupCheck]}" />
|
|
||||||
|
|
||||||
<TextBlock Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2"
|
|
||||||
Margin="0,6,0,0" TextWrapping="Wrap"
|
|
||||||
Foreground="{DynamicResource Theme.SecondaryForeground}"
|
|
||||||
Visibility="{Binding IsStartupLocked, Converter={StaticResource BooleanToVisibility}}"
|
|
||||||
Text="{Binding Localization[StartupLockedHint]}" />
|
|
||||||
</Grid>
|
|
||||||
</GroupBox>
|
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Grid.Column="1" Margin="16,0,0,0">
|
|
||||||
|
|
||||||
<!-- Where the popup appears and how it looks are one question for the
|
|
||||||
user, so both live in a single section: the rule is picked at the
|
|
||||||
top and its result is seen in the preview at the bottom -->
|
|
||||||
<GroupBox Header="{Binding Localization[SectionPopup]}">
|
<GroupBox Header="{Binding Localization[SectionPopup]}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -358,8 +247,6 @@
|
|||||||
Converter={StaticResource EnumToVisibility},
|
Converter={StaticResource EnumToVisibility},
|
||||||
ConverterParameter=FixedPoint}" />
|
ConverterParameter=FixedPoint}" />
|
||||||
|
|
||||||
<!-- A hairline between the two halves of the section: the
|
|
||||||
placement above, the look of the popup below -->
|
|
||||||
<Border Grid.Row="7" Grid.ColumnSpan="3"
|
<Border Grid.Row="7" Grid.ColumnSpan="3"
|
||||||
Margin="0,16,0,0" Height="1"
|
Margin="0,16,0,0" Height="1"
|
||||||
Background="{DynamicResource Theme.ControlBorder}" />
|
Background="{DynamicResource Theme.ControlBorder}" />
|
||||||
@@ -422,7 +309,98 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
|
<GroupBox Header="{Binding Localization[SectionBehavior]}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="164" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Style="{StaticResource FieldLabel}"
|
||||||
|
Text="{Binding Localization[DurationLabel]}" />
|
||||||
|
<Slider Grid.Column="1" Minimum="200" Maximum="5000" TickFrequency="100"
|
||||||
|
Value="{Binding Settings.DurationMilliseconds}" />
|
||||||
|
<StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center">
|
||||||
|
<TextBlock Style="{StaticResource FieldValue}"
|
||||||
|
Text="{Binding Settings.DurationMilliseconds, StringFormat={}{0:F0}}" />
|
||||||
|
<TextBlock Margin="4,0,0,0"
|
||||||
|
Foreground="{DynamicResource Theme.SecondaryForeground}"
|
||||||
|
Text="{Binding Localization[MillisecondsSuffix]}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="1" Margin="0,12,12,0"
|
||||||
|
Style="{StaticResource FieldLabel}"
|
||||||
|
Text="{Binding Localization[CapsLockLabel]}" />
|
||||||
|
<CheckBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Margin="0,12,0,0"
|
||||||
|
IsChecked="{Binding Settings.UseCapsLockHotkey}"
|
||||||
|
Content="{Binding Localization[CapsLockHotkeyCheck]}" />
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="2" Margin="0,12,12,0"
|
||||||
|
Style="{StaticResource FieldLabel}"
|
||||||
|
Text="{Binding Localization[CapsLockHoldLabel]}" />
|
||||||
|
<Slider Grid.Row="2" Grid.Column="1" Margin="0,12,0,0"
|
||||||
|
Minimum="150" Maximum="1500" TickFrequency="50"
|
||||||
|
Value="{Binding Settings.CapsLockHoldMilliseconds}"
|
||||||
|
IsEnabled="{Binding Settings.UseCapsLockHotkey}" />
|
||||||
|
<StackPanel Grid.Row="2" Grid.Column="2" Margin="0,12,0,0"
|
||||||
|
Orientation="Horizontal" VerticalAlignment="Center">
|
||||||
|
<TextBlock Style="{StaticResource FieldValue}"
|
||||||
|
Text="{Binding Settings.CapsLockHoldMilliseconds, StringFormat={}{0:F0}}" />
|
||||||
|
<TextBlock Margin="4,0,0,0"
|
||||||
|
Foreground="{DynamicResource Theme.SecondaryForeground}"
|
||||||
|
Text="{Binding Localization[MillisecondsSuffix]}" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2"
|
||||||
|
Margin="0,6,0,0" TextWrapping="Wrap"
|
||||||
|
Foreground="{DynamicResource Theme.SecondaryForeground}">
|
||||||
|
<Run Text="{Binding Localization[CapsLockHoldHint], Mode=OneWay}" />
|
||||||
|
<InlineUIContainer BaselineAlignment="Baseline">
|
||||||
|
<!-- The elevation caveat lives in the tooltip to keep the section compact -->
|
||||||
|
<TextBlock Text="{Binding Localization[MoreInfoLink]}"
|
||||||
|
Foreground="{DynamicResource Theme.Accent}"
|
||||||
|
TextDecorations="Underline"
|
||||||
|
Cursor="Help"
|
||||||
|
ToolTipService.InitialShowDelay="200"
|
||||||
|
ToolTipService.ShowDuration="60000"
|
||||||
|
Visibility="{Binding Settings.UseCapsLockHotkey, Converter={StaticResource BooleanToVisibility}}">
|
||||||
|
<TextBlock.ToolTip>
|
||||||
|
<ToolTip>
|
||||||
|
<TextBlock TextWrapping="Wrap"
|
||||||
|
Text="{Binding Localization[CapsLockElevationHint]}" />
|
||||||
|
</ToolTip>
|
||||||
|
</TextBlock.ToolTip>
|
||||||
|
</TextBlock>
|
||||||
|
</InlineUIContainer>
|
||||||
|
</TextBlock>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="4" Margin="0,12,12,0"
|
||||||
|
Style="{StaticResource FieldLabel}"
|
||||||
|
Visibility="{Binding IsStartupAvailable, Converter={StaticResource BooleanToVisibility}}"
|
||||||
|
Text="{Binding Localization[StartupLabel]}" />
|
||||||
|
<CheckBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" Margin="0,12,0,0"
|
||||||
|
Visibility="{Binding IsStartupAvailable, Converter={StaticResource BooleanToVisibility}}"
|
||||||
|
IsEnabled="{Binding CanChangeStartup}"
|
||||||
|
IsChecked="{Binding RunAtStartup}"
|
||||||
|
Content="{Binding Localization[StartupCheck]}" />
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2"
|
||||||
|
Margin="0,6,0,0" TextWrapping="Wrap"
|
||||||
|
Foreground="{DynamicResource Theme.SecondaryForeground}"
|
||||||
|
Visibility="{Binding IsStartupLocked, Converter={StaticResource BooleanToVisibility}}"
|
||||||
|
Text="{Binding Localization[StartupLockedHint]}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
Reference in New Issue
Block a user