-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSettingsWindow.xaml
More file actions
208 lines (188 loc) · 8.31 KB
/
Copy pathSettingsWindow.xaml
File metadata and controls
208 lines (188 loc) · 8.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<Window x:Class="UltraFocusMode.SettingsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="UltraFocusMode — Settings"
Width="430" Height="400"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
Background="#111120"
FontFamily="Segoe UI"
KeyDown="Window_KeyDown">
<Window.Resources>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="#ccccee"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style x:Key="FlatBtn" TargetType="Button">
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="18,6"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="FontFamily" Value="Segoe UI"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Bd"
Background="{TemplateBinding Background}"
CornerRadius="4"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Opacity" Value="0.85"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Bd" Property="Opacity" Value="0.7"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Checkbox style to match dark theme -->
<Style TargetType="CheckBox">
<Setter Property="Foreground" Value="#ccccee"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Cursor" Value="Hand"/>
</Style>
</Window.Resources>
<Grid Margin="28,24,28,20">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <!-- title -->
<RowDefinition Height="22"/>
<RowDefinition Height="Auto"/> <!-- activation hotkey row -->
<RowDefinition Height="18"/>
<RowDefinition Height="Auto"/> <!-- opacity row -->
<RowDefinition Height="22"/>
<RowDefinition Height="1"/> <!-- separator -->
<RowDefinition Height="16"/>
<RowDefinition Height="Auto"/> <!-- same-combo checkbox -->
<RowDefinition Height="12"/>
<RowDefinition Height="Auto"/> <!-- exit hotkey row -->
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/> <!-- buttons -->
</Grid.RowDefinitions>
<!-- Title -->
<TextBlock Grid.Row="0"
Text="UltraFocusMode Settings"
FontSize="17"
FontWeight="SemiBold"
Foreground="White"/>
<!-- Activation hotkey row -->
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="130"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="72"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Activation hotkey:"/>
<Border Grid.Column="1"
Background="#0d0d22"
BorderBrush="#334488"
BorderThickness="1"
CornerRadius="4"
Padding="8,4"
Margin="0,0,8,0">
<TextBox x:Name="HotkeyBox"
Background="Transparent"
Foreground="#aabbff"
BorderThickness="0"
IsReadOnly="True"
CaretBrush="White"
FontSize="13"
FontFamily="Segoe UI"
VerticalAlignment="Center"
PreviewKeyDown="HotkeyBox_PreviewKeyDown"
GotFocus="HotkeyBox_GotFocus"
LostFocus="HotkeyBox_LostFocus"/>
</Border>
<Button Grid.Column="2"
Content="Clear"
Background="#2a2a44"
Style="{StaticResource FlatBtn}"
Click="ClearActivationHotkey_Click"/>
</Grid>
<!-- Opacity row -->
<Grid Grid.Row="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="130"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="46"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Overlay opacity:"/>
<Slider Grid.Column="1"
x:Name="OpacitySlider"
Minimum="0.20" Maximum="1.0"
SmallChange="0.05"
LargeChange="0.1"
TickFrequency="0.05"
VerticalAlignment="Center"
ValueChanged="OpacitySlider_ValueChanged"/>
<TextBlock Grid.Column="2"
x:Name="OpacityLabel"
HorizontalAlignment="Right"
Foreground="#aabbff"/>
</Grid>
<!-- Separator -->
<Rectangle Grid.Row="6" Fill="#222244" Height="1"/>
<!-- Same-combo checkbox -->
<CheckBox Grid.Row="8"
x:Name="SameComboCheck"
Content="Use same combination to exit focus mode"
Checked="SameComboCheck_Changed"
Unchecked="SameComboCheck_Changed"/>
<!-- Exit hotkey row (disabled when SameComboCheck is checked) -->
<Grid Grid.Row="10" x:Name="ExitHotkeyRow">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="130"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="72"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Exit hotkey:"/>
<Border Grid.Column="1"
Background="#0d0d22"
BorderBrush="#334488"
BorderThickness="1"
CornerRadius="4"
Padding="8,4"
Margin="0,0,8,0">
<TextBox x:Name="ExitHotkeyBox"
Background="Transparent"
Foreground="#aabbff"
BorderThickness="0"
IsReadOnly="True"
CaretBrush="White"
FontSize="13"
FontFamily="Segoe UI"
VerticalAlignment="Center"
PreviewKeyDown="ExitHotkeyBox_PreviewKeyDown"
GotFocus="ExitHotkeyBox_GotFocus"
LostFocus="ExitHotkeyBox_LostFocus"/>
</Border>
<Button Grid.Column="2"
Content="Clear"
Background="#2a2a44"
Style="{StaticResource FlatBtn}"
Click="ClearExitHotkey_Click"/>
</Grid>
<!-- Action buttons -->
<StackPanel Grid.Row="12"
Orientation="Horizontal"
HorizontalAlignment="Right">
<Button Content="Cancel"
Background="#1e1e38"
Style="{StaticResource FlatBtn}"
Margin="0,0,10,0"
Click="Cancel_Click"/>
<Button Content="Save"
Background="#3344cc"
Style="{StaticResource FlatBtn}"
Click="Save_Click"/>
</StackPanel>
</Grid>
</Window>