Skip to content

Commit

Permalink
Improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanLua committed Dec 8, 2024
1 parent d44ff42 commit dbcff6c
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 65 deletions.
123 changes: 59 additions & 64 deletions FluentAutoClicker/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<Grid RowSpacing="{StaticResource GridRowSpacing}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
Expand All @@ -17,16 +18,10 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<StackPanel
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2"
HorizontalAlignment="Stretch"
Spacing="{StaticResource StackPanelRowSpacing}">
<TextBlock
x:Name="ClickIntervalTextBlock"
x:Uid="TextBlockClickInterval"
HorizontalAlignment="Left" />

<!-- Click Interval -->
<StackPanel Grid.ColumnSpan="2" Spacing="{StaticResource StackPanelRowSpacing}">
<TextBlock x:Name="ClickIntervalTextBlock" x:Uid="TextBlockClickInterval" />
<Grid ColumnSpacing="{StaticResource RadioButtonsColumnSpacing}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
Expand All @@ -37,7 +32,6 @@
<NumberBox
x:Name="NumberBoxHours"
x:Uid="NumberBoxHours"
Grid.Column="0"
HorizontalAlignment="Stretch"
AcceptsExpression="True"
Maximum="48"
Expand Down Expand Up @@ -82,71 +76,72 @@
Value="100" />
</Grid>
</StackPanel>
<StackPanel

<!-- Mouse Button -->
<ComboBox
x:Name="MouseButtonTypeComboBox"
x:Uid="ComboBoxMouseButton"
Grid.Row="1"
Grid.Column="0"
Spacing="{StaticResource StackPanelRowSpacing}">
<ComboBox
x:Name="MouseButtonTypeComboBox"
x:Uid="ComboBoxMouseButton"
SelectedIndex="0">
<ComboBoxItem x:Uid="ComboBoxItemLeft" />
<ComboBoxItem x:Uid="ComboBoxItemMiddle" />
<ComboBoxItem x:Uid="ComboBoxItemRight" />
</ComboBox>
<TextBlock
x:Name="HotkeyTextBlock"
x:Uid="TextBlockHotkey"
HorizontalAlignment="Left" />
SelectedIndex="0">
<ComboBoxItem x:Uid="ComboBoxItemLeft" />
<ComboBoxItem x:Uid="ComboBoxItemMiddle" />
<ComboBoxItem x:Uid="ComboBoxItemRight" />
</ComboBox>

<!-- Hotkey -->
<StackPanel Grid.Row="2" Spacing="{StaticResource StackPanelRowSpacing}">
<TextBlock x:Name="HotkeyTextBlock" x:Uid="TextBlockHotkey" />
<Button
x:Name="HotkeyButton"
Content="F6"
IsEnabled="False" />
</StackPanel>

<!-- Click Repeat -->
<StackPanel Grid.Row="1" Grid.Column="1">
<StackPanel Orientation="Vertical">
<CheckBox
x:Name="ClickRepeatCheckBox"
x:Uid="ClickRepeatCheckBox"
Checked="ClickRepeatCheckBox_Checked"
Unchecked="ClickRepeatCheckBox_Unchecked" />
<NumberBox
x:Name="ClickRepeatAmount"
HorizontalAlignment="Left"
IsEnabled="False"
LargeChange="10"
Minimum="1"
PlaceholderText="100"
SmallChange="1"
SpinButtonPlacementMode="Compact"
Value="100" />
</StackPanel>
<StackPanel Orientation="Vertical">
<CheckBox
x:Name="ClickOffsetCheckBox"
x:Uid="ClickOffsetCheckBox"
Checked="ClickOffsetCheckBox_Checked"
Unchecked="ClickOffsetCheckBox_Unchecked" />
<NumberBox
x:Name="ClickOffsetAmount"
HorizontalAlignment="Left"
AcceptsExpression="True"
IsEnabled="False"
LargeChange="25"
Maximum="1000"
Minimum="1"
PlaceholderText="0-1000"
SmallChange="5"
SpinButtonPlacementMode="Compact"
Value="10" />
</StackPanel>
<CheckBox
x:Name="ClickRepeatCheckBox"
x:Uid="ClickRepeatCheckBox"
Checked="ClickRepeatCheckBox_Checked"
Unchecked="ClickRepeatCheckBox_Unchecked" />
<NumberBox
x:Name="ClickRepeatAmount"
HorizontalAlignment="Left"
IsEnabled="False"
LargeChange="10"
Minimum="1"
PlaceholderText="100"
SmallChange="1"
SpinButtonPlacementMode="Compact"
Value="100" />
</StackPanel>

<!-- Click Offset -->
<StackPanel Grid.Row="2" Grid.Column="1">
<CheckBox
x:Name="ClickOffsetCheckBox"
x:Uid="ClickOffsetCheckBox"
Checked="ClickOffsetCheckBox_Checked"
Unchecked="ClickOffsetCheckBox_Unchecked" />
<NumberBox
x:Name="ClickOffsetAmount"
HorizontalAlignment="Left"
AcceptsExpression="True"
IsEnabled="False"
LargeChange="25"
Maximum="1000"
Minimum="1"
PlaceholderText="0-1000"
SmallChange="5"
SpinButtonPlacementMode="Compact"
Value="10" />
</StackPanel>

<!-- Start Auto Clicker -->
<ToggleButton
x:Name="StartToggleButton"
x:Uid="ToggleButtonStart"
Grid.Row="2"
Grid.Column="0"
Grid.Row="3"
Grid.ColumnSpan="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Bottom"
Expand Down
2 changes: 1 addition & 1 deletion FluentAutoClicker/Styles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

<x:Double x:Key="RadioButtonsColumnSpacing">4</x:Double>
<x:Double x:Key="GridRowSpacing">16</x:Double>
<x:Double x:Key="GridRowSpacing">8</x:Double>
<x:Double x:Key="StackPanelRowSpacing">8</x:Double>

<Thickness x:Key="ContentMargin">16,8,16,16</Thickness>
Expand Down

0 comments on commit dbcff6c

Please sign in to comment.