-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
323 lines (308 loc) · 21.3 KB
/
Copy pathMainWindow.xaml
File metadata and controls
323 lines (308 loc) · 21.3 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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
<ui:FluentWindow x:Class="AmpUp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:mi="clr-namespace:Material.Icons.WPF;assembly=Material.Icons.WPF"
xmlns:views="clr-namespace:AmpUp.Views"
xmlns:controls="clr-namespace:AmpUp.Controls"
Title="Amp Up"
Icon="Assets/icon/ampup-48.png"
Width="1600" Height="1000"
MinWidth="900" MinHeight="600"
WindowStartupLocation="CenterScreen"
ExtendsContentIntoTitleBar="True"
WindowBackdropType="None"
BorderThickness="0"
BorderBrush="Transparent"
Background="{DynamicResource BgBaseBrush}">
<ui:FluentWindow.Resources>
<FontFamily x:Key="MaterialSymbols">pack://application:,,,/Fonts/#Material Symbols Outlined</FontFamily>
<!-- DesiredFrameRate=10: the dot carries a DropShadowEffect, so every animation
frame forces an effect re-rasterization. 10 FPS is visually identical for a
1s opacity fade and cuts the render cost to a sixth. -->
<Storyboard x:Key="PulseAnimation" RepeatBehavior="Forever" Timeline.DesiredFrameRate="10">
<DoubleAnimation Storyboard.TargetName="ConnectionDot"
Storyboard.TargetProperty="Opacity"
From="1.0" To="0.4" Duration="0:0:1"
AutoReverse="True"
Timeline.DesiredFrameRate="10" />
</Storyboard>
</ui:FluentWindow.Resources>
<Grid>
<Grid.RowDefinitions>
<!-- Title bar area -->
<RowDefinition Height="48" />
<!-- Content -->
<RowDefinition Height="*" />
<!-- Hardware preview strip (hidden) -->
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- Header Bar (draggable) -->
<Grid Grid.Row="0" Background="{DynamicResource BgBaseBrush}"
MouseLeftButtonDown="HeaderBar_MouseLeftButtonDown">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- Branding -->
<StackPanel Grid.Column="0" Orientation="Horizontal" Margin="14,0,0,0" VerticalAlignment="Center">
<Image Source="pack://application:,,,/Assets/icon/ampup-48.png" Height="38"
RenderOptions.BitmapScalingMode="HighQuality" VerticalAlignment="Center" />
<TextBlock VerticalAlignment="Center" Margin="6,0,0,0">
<Run Text="AMP" FontFamily="Segoe UI Black" FontSize="16" FontWeight="Black"
Foreground="#2E8B38" />
<Run Text=" " FontSize="4" />
<Run Text="UP" FontFamily="Segoe UI Black" FontSize="16" FontWeight="Black"
Foreground="#4CAF50" />
</TextBlock>
</StackPanel>
<!-- Connection Status + Window Controls -->
<StackPanel Grid.Column="2" Orientation="Horizontal" Margin="0,0,12,0" VerticalAlignment="Center">
<Ellipse x:Name="ConnectionDot" Width="8" Height="8" Fill="{StaticResource TextDimBrush}" Margin="0,0,8,0">
<Ellipse.Effect>
<DropShadowEffect x:Name="ConnectionDotGlow" Color="#00E676" BlurRadius="0" Opacity="0" ShadowDepth="0" />
</Ellipse.Effect>
</Ellipse>
<TextBlock x:Name="ConnectionLabel" Text="Disconnected" Style="{StaticResource SecondaryText}" VerticalAlignment="Center" />
<TextBlock x:Name="VersionLabel" Text="v0.3-alpha" Foreground="{StaticResource TextDimBrush}" FontSize="10"
VerticalAlignment="Center" Margin="10,0,0,0" Cursor="Hand"
MouseLeftButtonDown="VersionLabel_Click"
ToolTip="Click to check for updates" />
<!-- Traffic-light window buttons -->
<StackPanel Orientation="Horizontal" Margin="16,0,0,0">
<!-- Minimize (yellow) -->
<Border x:Name="BtnMinimize" Width="14" Height="14" CornerRadius="7"
Background="#FFBD2E" Margin="0,0,8,0" Cursor="Hand"
MouseLeftButtonDown="BtnMinimize_Click"
ToolTip="Minimize">
<TextBlock Text="—" FontSize="8" FontWeight="Bold" Foreground="#995700"
HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="0,-2,0,0" Opacity="0" x:Name="MinIcon" />
</Border>
<!-- Maximize (green) -->
<Border x:Name="BtnMaximize" Width="14" Height="14" CornerRadius="7"
Background="#27C93F" Margin="0,0,8,0" Cursor="Hand"
MouseLeftButtonDown="BtnMaximize_Click"
ToolTip="Maximize">
<TextBlock Text="⤢" FontSize="9" FontWeight="Bold" Foreground="#0A6C15"
HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="0,-1,0,0" Opacity="0" x:Name="MaxIcon" />
</Border>
<!-- Close (red) -->
<Border x:Name="BtnClose" Width="14" Height="14" CornerRadius="7"
Background="#FF5F56" Cursor="Hand"
MouseLeftButtonDown="BtnClose_Click"
ToolTip="Close">
<TextBlock Text="✕" FontSize="8" FontWeight="Bold" Foreground="#990F04"
HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="0,-1,0,0" Opacity="0" x:Name="CloseIcon" />
</Border>
</StackPanel>
</StackPanel>
</Grid>
<!-- Hardware Preview Strip (Row 2 — always visible, full width) -->
<controls:HardwarePreview x:Name="HwPreview" Grid.Row="2"
ToolTip="Live hardware status — click a knob to navigate to Mixer tab"
Visibility="Collapsed" />
<!-- Main Layout: Sidebar + Content -->
<Grid Grid.Row="1" Background="{DynamicResource BgDarkBrush}">
<Grid.ColumnDefinitions>
<!-- Sidebar -->
<ColumnDefinition Width="76" />
<!-- Content -->
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- Sidebar Navigation -->
<Border Grid.Column="0" Background="{DynamicResource BgBaseBrush}"
BorderBrush="{DynamicResource CardBorderBrush}" BorderThickness="0,0,1,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- Profile button at top of sidebar -->
<StackPanel Grid.Row="0" Margin="0,12,0,0">
<Border x:Name="ProfileButton" Width="48" Height="48" CornerRadius="24"
Background="{DynamicResource CardBgBrush}"
BorderThickness="2" Cursor="Hand" ToolTip="Switch profile"
HorizontalAlignment="Center"
MouseLeftButtonUp="ProfileButton_Click">
<Border.BorderBrush>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#8800E676" Offset="0" />
<GradientStop Color="#4400E676" Offset="1" />
</LinearGradientBrush>
</Border.BorderBrush>
<Border.Effect>
<DropShadowEffect Color="#00E676" BlurRadius="12" Opacity="0.25" ShadowDepth="0" />
</Border.Effect>
<mi:MaterialIcon x:Name="ProfileIcon" Kind="AccountCircleOutline"
Width="22" Height="22" Foreground="{DynamicResource AccentBrush}"
HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<TextBlock x:Name="ProfileLabel" Text="Default" FontSize="8" FontWeight="Medium"
Foreground="{StaticResource TextSecBrush}"
HorizontalAlignment="Center" Margin="0,5,0,0"
TextTrimming="CharacterEllipsis" MaxWidth="60" TextAlignment="Center" />
<!-- Separator line under profile button -->
<Border Height="1" Margin="14,10,14,0"
Background="{DynamicResource AccentBorder22Brush}" />
</StackPanel>
<!-- ProfilePopupPanel is populated and shown via code-behind Window flyout -->
<StackPanel x:Name="ProfilePopupPanel" Visibility="Collapsed" />
<DockPanel Grid.Row="1" Margin="0,12,0,0" LastChildFill="True">
<!-- Settings at very bottom -->
<Button x:Name="NavSettings" Style="{StaticResource NavButton}" Click="NavSettings_Click"
DockPanel.Dock="Bottom">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border x:Name="NavSettingsBar" Grid.Column="0" Width="6" Height="6" CornerRadius="3"
Background="{DynamicResource AccentBrush}" VerticalAlignment="Center"
Visibility="Collapsed" Margin="0" />
<StackPanel Grid.Column="1" HorizontalAlignment="Center">
<controls:PhosphorIcon x:Name="NavSettingsIcon" IconName="Gear" IconSize="22"
IconColor="#9A9A9A" HorizontalAlignment="Center" />
<TextBlock x:Name="NavSettingsLabel" Text="Settings" FontSize="9" Foreground="{StaticResource TextSecBrush}"
HorizontalAlignment="Center" Margin="0,3,0,0" />
</StackPanel>
</Grid>
</Button>
<Button x:Name="NavBindings" Style="{StaticResource NavButton}" Click="NavBindings_Click"
DockPanel.Dock="Bottom" ToolTip="Overview of all knob and button bindings across profiles">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border x:Name="NavBindingsBar" Grid.Column="0" Width="6" Height="6" CornerRadius="3"
Background="{DynamicResource AccentBrush}" VerticalAlignment="Center"
Visibility="Collapsed" Margin="0" />
<StackPanel Grid.Column="1" HorizontalAlignment="Center">
<controls:PhosphorIcon x:Name="NavBindingsIcon" IconName="AppWindow" IconSize="22"
IconColor="#9A9A9A" HorizontalAlignment="Center" />
<TextBlock x:Name="NavBindingsLabel" Text="Overview" FontSize="9" Foreground="{StaticResource TextSecBrush}"
HorizontalAlignment="Center" Margin="0,3,0,0" />
</StackPanel>
</Grid>
</Button>
<!-- Nav items -->
<StackPanel>
<Button x:Name="NavMixer" Style="{StaticResource NavButton}" Click="NavMixer_Click">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border x:Name="NavMixerBar" Grid.Column="0" Width="6" Height="6" CornerRadius="3"
Background="{DynamicResource AccentBrush}" VerticalAlignment="Center"
Visibility="Collapsed" Margin="0" />
<StackPanel Grid.Column="1" HorizontalAlignment="Center">
<controls:PhosphorIcon x:Name="NavMixerIcon" IconName="SlidersHorizontal" IconSize="22"
IconColor="#00E676" HorizontalAlignment="Center" />
<TextBlock x:Name="NavMixerLabel" Text="Mixer" FontSize="9" Foreground="{DynamicResource AccentBrush}"
HorizontalAlignment="Center" Margin="0,3,0,0" />
</StackPanel>
</Grid>
</Button>
<Button x:Name="NavButtons" Style="{StaticResource NavButton}" Click="NavButtons_Click">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border x:Name="NavButtonsBar" Grid.Column="0" Width="6" Height="6" CornerRadius="3"
Background="{DynamicResource AccentBrush}" VerticalAlignment="Center"
Visibility="Collapsed" Margin="0" />
<StackPanel Grid.Column="1" HorizontalAlignment="Center">
<controls:PhosphorIcon x:Name="NavButtonsIcon" IconName="Keyboard" IconSize="22"
IconColor="#9A9A9A" HorizontalAlignment="Center" />
<TextBlock x:Name="NavButtonsLabel" Text="Buttons" FontSize="9" Foreground="{StaticResource TextSecBrush}"
HorizontalAlignment="Center" Margin="0,3,0,0" />
</StackPanel>
</Grid>
</Button>
<Button x:Name="NavLights" Style="{StaticResource NavButton}" Click="NavLights_Click">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border x:Name="NavLightsBar" Grid.Column="0" Width="6" Height="6" CornerRadius="3"
Background="{DynamicResource AccentBrush}" VerticalAlignment="Center"
Visibility="Collapsed" Margin="0" />
<StackPanel Grid.Column="1" HorizontalAlignment="Center">
<controls:PhosphorIcon x:Name="NavLightsIcon" IconName="Lightbulb" IconSize="22"
IconColor="#9A9A9A" HorizontalAlignment="Center" />
<TextBlock x:Name="NavLightsLabel" Text="Lights" FontSize="9" Foreground="{StaticResource TextSecBrush}"
HorizontalAlignment="Center" Margin="0,3,0,0" />
</StackPanel>
</Grid>
</Button>
<Button x:Name="NavAmbience" Style="{StaticResource NavButton}" Click="NavAmbience_Click">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border x:Name="NavAmbienceBar" Grid.Column="0" Width="6" Height="6" CornerRadius="3"
Background="{DynamicResource AccentBrush}" VerticalAlignment="Center"
Visibility="Collapsed" Margin="0" />
<StackPanel Grid.Column="1" HorizontalAlignment="Center">
<controls:PhosphorIcon x:Name="NavAmbienceIcon" IconName="House" IconSize="22"
IconColor="#9A9A9A" HorizontalAlignment="Center" />
<TextBlock x:Name="NavAmbienceLabel" Text="Room" FontSize="9" Foreground="{StaticResource TextSecBrush}"
HorizontalAlignment="Center" Margin="0,3,0,0" />
</StackPanel>
</Grid>
</Button>
<Button x:Name="NavOsd" Style="{StaticResource NavButton}" Click="NavOsd_Click"
ToolTip="OSD Overlay & Quick Wheel settings">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border x:Name="NavOsdBar" Grid.Column="0" Width="6" Height="6" CornerRadius="3"
Background="{DynamicResource AccentBrush}" VerticalAlignment="Center"
Visibility="Collapsed" Margin="0" />
<StackPanel Grid.Column="1" HorizontalAlignment="Center">
<controls:PhosphorIcon x:Name="NavOsdIcon" IconName="Monitor" IconSize="22"
IconColor="#9A9A9A" HorizontalAlignment="Center" />
<TextBlock x:Name="NavOsdLabel" Text="OSD" FontSize="9" Foreground="{StaticResource TextSecBrush}"
HorizontalAlignment="Center" Margin="0,3,0,0" />
</StackPanel>
</Grid>
</Button>
<Button x:Name="NavGroups" Style="{StaticResource NavButton}" Click="NavGroups_Click"
ToolTip="Device Groups — organize Govee, Corsair, and HA devices">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border x:Name="NavGroupsBar" Grid.Column="0" Width="6" Height="6" CornerRadius="3"
Background="{DynamicResource AccentBrush}" VerticalAlignment="Center"
Visibility="Collapsed" Margin="0" />
<StackPanel Grid.Column="1" HorizontalAlignment="Center">
<controls:PhosphorIcon x:Name="NavGroupsIcon" IconName="Link" IconSize="22"
IconColor="#9A9A9A" HorizontalAlignment="Center" />
<TextBlock x:Name="NavGroupsLabel" Text="Groups" FontSize="9" Foreground="{StaticResource TextSecBrush}"
HorizontalAlignment="Center" Margin="0,3,0,0" />
</StackPanel>
</Grid>
</Button>
</StackPanel>
</DockPanel>
</Grid>
</Border>
<!-- Content Area -->
<Border Grid.Column="1" Padding="24,16">
<ContentControl x:Name="ContentArea" />
</Border>
</Grid>
</Grid>
</ui:FluentWindow>