Skip to content

Commit 32907a0

Browse files
Reduce the layout flickering
Make all elements that aren't always visible, not visible by default. GH-102
1 parent 05a07be commit 32907a0

File tree

4 files changed

+21
-18
lines changed

4 files changed

+21
-18
lines changed

src/KeyboardSwitch.Settings/Views/AboutView.axaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
HorizontalAlignment="Left" />
1818

1919
<Button x:Name="GetNewVersionButton" Content="{l:Translate GetNewVersion}" Classes="accent"
20-
HorizontalAlignment="Left" />
20+
HorizontalAlignment="Left" IsVisible="False" />
2121
</WrapPanel>
2222

2323
<TextBlock x:Name="NoNewVersionsTextBlock" Text="{l:Translate NoNewVersions}" Margin="10"
2424
FontSize="{DynamicResource FontSizeNormal}" IsVisible="False" />
2525

2626
<TextBlock x:Name="GetNewVersionHintTextBlock" Text="{l:Translate GetNewVersionHint}" Margin="10"
27-
FontSize="{DynamicResource FontSizeNormal}" TextWrapping="Wrap" />
27+
FontSize="{DynamicResource FontSizeNormal}" TextWrapping="Wrap" IsVisible="False" />
2828
</StackPanel>
2929
</UserControl>

src/KeyboardSwitch.Settings/Views/CharMappingView.axaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</UserControl.Styles>
1313

1414
<DockPanel>
15-
<StackPanel x:Name="ActionPanel" DockPanel.Dock="Bottom">
15+
<StackPanel x:Name="ActionPanel" DockPanel.Dock="Bottom" IsVisible="False">
1616
<Button x:Name="SaveButton" Content="{l:Translate Save}" Classes="accent" />
1717
<Button x:Name="CancelButton" Content="{l:Translate Cancel}" />
1818
</StackPanel>
@@ -26,11 +26,14 @@
2626
Grid.IsSharedSizeScope="True" />
2727

2828
<Button x:Name="AutoConfigureButton" Content="{l:Translate AutoConfigure}" Classes="accent"
29-
FontSize="{DynamicResource FontSizeLarge}" Margin="10" HorizontalAlignment="Center" />
29+
FontSize="{DynamicResource FontSizeLarge}" Margin="10" HorizontalAlignment="Center"
30+
IsVisible="False" />
3031

31-
<TextBlock x:Name="NewLayoutsTextBlock" Text="{l:Translate NewLayoutsHint}" Classes="Hint" />
32+
<TextBlock x:Name="NewLayoutsTextBlock" Text="{l:Translate NewLayoutsHint}" Classes="Hint"
33+
IsVisible="False" />
3234

33-
<StackPanel x:Name="RemoveLayoutsPanel" Orientation="Horizontal" HorizontalAlignment="Center">
35+
<StackPanel x:Name="RemoveLayoutsPanel" Orientation="Horizontal" HorizontalAlignment="Center"
36+
IsVisible="False">
3437
<TextBlock Text="{l:Translate RemoveLayoutsHint}" Classes="Hint" MaxWidth="500" />
3538
<Button x:Name="RemoveLayoutsButton" Content="{l:Translate DeleteLayoutConfiguration}"
3639
Margin="0 10" VerticalAlignment="Center" />

src/KeyboardSwitch.Settings/Views/PreferencesView.axaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:l="using:KeyboardSwitch.Settings.Localization"
55
x:Class="KeyboardSwitch.Settings.Views.PreferencesView">
66
<DockPanel>
7-
<StackPanel x:Name="ActionPanel" DockPanel.Dock="Bottom">
7+
<StackPanel x:Name="ActionPanel" DockPanel.Dock="Bottom" IsVisible="False">
88
<Button x:Name="SaveButton" Content="{l:Translate Save}" Classes="accent" />
99
<Button x:Name="CancelButton" Content="{l:Translate Cancel}" />
1010
</StackPanel>
@@ -24,7 +24,7 @@
2424
<StackPanel Orientation="Horizontal" Margin="10">
2525
<CheckBox x:Name="ShowRemovedLayoutsMessageCheckBox" Classes="FormControl"
2626
Content="{l:Translate ShowUninstalledLayoutsMessage}" />
27-
<CheckBox x:Name="UseXselCheckBox" Classes="FormControl"
27+
<CheckBox x:Name="UseXselCheckBox" Classes="FormControl" IsVisible="False"
2828
Content="{l:Translate UseXsel}" ToolTip.Tip="{l:Translate UseXselHint}" />
2929
</StackPanel>
3030

@@ -68,10 +68,10 @@
6868
<ComboBox x:Name="AppThemeVariantComboBox" Classes="FormControl" />
6969
</StackPanel>
7070

71-
<TextBlock x:Name="PressCountValidationTextBlock" Classes="Error" />
72-
<TextBlock x:Name="WaitMillisecondsValidationTextBlock" Classes="Error" />
73-
<TextBlock x:Name="ModifierKeysValidationTextBlock" Classes="Error" />
74-
<TextBlock x:Name="SwitchMethodsValidationTextBlock" Classes="Error" />
71+
<TextBlock x:Name="PressCountValidationTextBlock" Classes="Error" IsVisible="False" />
72+
<TextBlock x:Name="WaitMillisecondsValidationTextBlock" Classes="Error" IsVisible="False" />
73+
<TextBlock x:Name="ModifierKeysValidationTextBlock" Classes="Error" IsVisible="False" />
74+
<TextBlock x:Name="SwitchMethodsValidationTextBlock" Classes="Error" IsVisible="False" />
7575
</StackPanel>
7676
</ScrollViewer>
7777
</DockPanel>

src/KeyboardSwitch.Settings/Views/ServiceView.axaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212
</Style>
1313
</StackPanel.Styles>
1414

15-
<TextBlock x:Name="ServiceRunningTextBlock" Classes="Status"
15+
<TextBlock x:Name="ServiceRunningTextBlock" Classes="Status" IsVisible="False"
1616
Text="{l:Translate KeyboardSwitchServiceRunning}" />
1717

18-
<TextBlock x:Name="ServiceNotRunningTextBlock" Classes="Status"
18+
<TextBlock x:Name="ServiceNotRunningTextBlock" Classes="Status" IsVisible="False"
1919
Text="{l:Translate KeyboardSwitchServiceNotRunning}" />
2020

21-
<TextBlock x:Name="ServiceShuttingDownTextBlock" Classes="Status"
21+
<TextBlock x:Name="ServiceShuttingDownTextBlock" Classes="Status" IsVisible="False"
2222
Text="{l:Translate KeyboardSwitchServiceShuttingDown}" />
2323

24-
<Button x:Name="StartServiceButton" Content="{l:Translate Start}" Classes="accent" />
25-
<Button x:Name="StopServiceButton" Content="{l:Translate Stop}" />
26-
<Button x:Name="KillServiceButton" Content="{l:Translate Kill}" />
24+
<Button x:Name="StartServiceButton" Content="{l:Translate Start}" Classes="accent" IsVisible="False" />
25+
<Button x:Name="StopServiceButton" Content="{l:Translate Stop}" IsVisible="False" />
26+
<Button x:Name="KillServiceButton" Content="{l:Translate Kill}" IsVisible="False" />
2727
</StackPanel>
2828
</Border>
2929
</UserControl>

0 commit comments

Comments
 (0)