-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCaptionWindow.xaml
More file actions
533 lines (505 loc) · 33.1 KB
/
Copy pathCaptionWindow.xaml
File metadata and controls
533 lines (505 loc) · 33.1 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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
<Window x:Class="MoonLiveCaptions.CaptionWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:conv="clr-namespace:MoonLiveCaptions.Converters"
Title="MoonLiveCaptions"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
Topmost="True"
ShowInTaskbar="True"
Width="720" Height="140"
MinWidth="420" MinHeight="80"
ResizeMode="CanResizeWithGrip">
<Window.Resources>
<conv:BoolToVisibilityConverter x:Key="BoolToVis"/>
<conv:EnumToBoolConverter x:Key="EnumToBool"/>
<conv:NullOrEmptyToVisibilityConverter x:Key="NullOrEmptyToVis"/>
<!-- ─── Header icon button ──────────────────────────────── -->
<Style x:Key="HeaderIconBtn" TargetType="Button">
<!-- icons should follow the current caption foreground color so they remain visible
in both light and dark themes -->
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{Binding ForegroundBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Width" Value="36"/>
<Setter Property="Height" Value="30"/>
<Setter Property="FontFamily" Value="Segoe MDL2 Assets"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Focusable" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Bd" Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#E5E5E5"/>
<!-- Foreground remains bound to ForegroundBrush -->
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#D0D0D0"/>
<!-- Foreground remains bound to ForegroundBrush -->
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ─── Settings toggle button (pill style) ──────────────── -->
<Style x:Key="PillToggle" TargetType="ToggleButton">
<Setter Property="Background" Value="#F0F0F0"/>
<Setter Property="Foreground" Value="#444444"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="14,6"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Focusable" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border x:Name="Bd" Background="{TemplateBinding Background}"
CornerRadius="20" Padding="{TemplateBinding Padding}">
<TextBlock Text="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#0067C0"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#E5E5E5"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsChecked" Value="True"/>
<Condition Property="IsMouseOver" Value="True"/>
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="#1975CC"/>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- DarkCheckBox style moved below after ApplyBtn -->
<!-- ─── Settings label ─────────────────────────────────── -->
<Style x:Key="SettingsLabel" TargetType="TextBlock">
<Setter Property="Foreground" Value="#888888"/>
<Setter Property="FontSize" Value="11"/>
<Setter Property="Margin" Value="0,10,0,5"/>
<Setter Property="FontWeight" Value="SemiBold"/>
</Style>
<!-- ─── Apply button ───────────────────────────────────── -->
<Style x:Key="ApplyBtn" TargetType="Button">
<Setter Property="Background" Value="#0067C0"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="14,6"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Cursor" Value="Hand"/>
<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="Background" Value="#1A86E0"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ─── Dark ComboBox ──────────────────────────────────── -->
<Style x:Key="DarkComboBox" TargetType="ComboBox">
<Setter Property="Background" Value="White"/>
<Setter Property="Foreground" Value="#1A1A1A"/>
<Setter Property="BorderBrush" Value="#C4C4C4"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Padding" Value="8,5"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid>
<ToggleButton x:Name="ToggleBtn"
IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
Focusable="False"
ClickMode="Press">
<ToggleButton.Template>
<ControlTemplate TargetType="ToggleButton">
<Border x:Name="border" Background="{Binding Background, RelativeSource={RelativeSource AncestorType=ComboBox}}"
BorderBrush="{Binding BorderBrush, RelativeSource={RelativeSource AncestorType=ComboBox}}"
BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource AncestorType=ComboBox}}"
CornerRadius="4">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="28"/>
</Grid.ColumnDefinitions>
<ContentPresenter Grid.Column="0"/>
<Path Grid.Column="1" Data="M0,0 L4,4 L8,0" Stroke="#666666" StrokeThickness="1.2"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="BorderBrush" Value="#0067C0"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
<ContentPresenter IsHitTestVisible="False"
Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
Margin="{TemplateBinding Padding}"
VerticalAlignment="Center"
HorizontalAlignment="Left">
<ContentPresenter.Resources>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="#1A1A1A"/>
</Style>
</ContentPresenter.Resources>
</ContentPresenter>
<Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom"
AllowsTransparency="True" Focusable="False" PopupAnimation="Slide">
<Border Background="White" BorderBrush="#E0E0E0" BorderThickness="1"
CornerRadius="8" Padding="2" Margin="0,2,0,0"
MinWidth="{TemplateBinding ActualWidth}">
<Border.Effect>
<DropShadowEffect BlurRadius="16" Opacity="0.12" ShadowDepth="4" Direction="270"/>
</Border.Effect>
<StackPanel IsItemsHost="True"/>
</Border>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ─── Dark ComboBoxItem ──────────────────────────────── -->
<Style x:Key="DarkComboBoxItem" TargetType="ComboBoxItem">
<Setter Property="Foreground" Value="#1A1A1A"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Padding" Value="8,6"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBoxItem">
<Border x:Name="Bd" Background="{TemplateBinding Background}"
Padding="{TemplateBinding Padding}" CornerRadius="3">
<ContentPresenter/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#F3F3F3"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#0067C0"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ─── Dark Slider ────────────────────────────────────── -->
<Style x:Key="DarkSlider" TargetType="Slider">
<Setter Property="Height" Value="24"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Slider">
<Grid VerticalAlignment="Center">
<Border Height="3" CornerRadius="1.5" Background="#D0D0D0" Margin="6,0"/>
<Track x:Name="PART_Track">
<Track.DecreaseRepeatButton>
<RepeatButton Command="Slider.DecreaseLarge" Opacity="0"/>
</Track.DecreaseRepeatButton>
<Track.Thumb>
<Thumb Width="14" Height="14">
<Thumb.Template>
<ControlTemplate TargetType="Thumb">
<Ellipse x:Name="ThumbEllipse" Fill="#0067C0" Width="14" Height="14">
<Ellipse.Effect>
<DropShadowEffect BlurRadius="4" Opacity="0.3" ShadowDepth="1"/>
</Ellipse.Effect>
</Ellipse>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ThumbEllipse" Property="Fill" Value="#1975CC"/>
<Setter TargetName="ThumbEllipse" Property="Width" Value="16"/>
<Setter TargetName="ThumbEllipse" Property="Height" Value="16"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Thumb.Template>
</Thumb>
</Track.Thumb>
<Track.IncreaseRepeatButton>
<RepeatButton Command="Slider.IncreaseLarge" Opacity="0"/>
</Track.IncreaseRepeatButton>
</Track>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ─── Dark CheckBox (full template) ──────────────────── -->
<Style x:Key="DarkCheckBox" TargetType="CheckBox">
<Setter Property="Foreground" Value="#1A1A1A"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Margin" Value="0,3"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<Border x:Name="Box" Width="16" Height="16" CornerRadius="3"
Background="White" BorderBrush="#C4C4C4" BorderThickness="1"
Margin="0,0,8,0" VerticalAlignment="Center">
<Path x:Name="Check" Data="M2,6 L6,10 L12,2" Stroke="White" StrokeThickness="1.5"
Visibility="Collapsed" HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="-1,-1,0,0"/>
</Border>
<ContentPresenter VerticalAlignment="Center"/>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Box" Property="Background" Value="#0067C0"/>
<Setter TargetName="Box" Property="BorderBrush" Value="#0067C0"/>
<Setter TargetName="Check" Property="Visibility" Value="Visible"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Box" Property="BorderBrush" Value="#0067C0"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<!-- ══════════════════════════════════════════════════════════ -->
<!-- Main container: Windows 11 Mica-like light background -->
<!-- ══════════════════════════════════════════════════════════ -->
<Border x:Name="MainContainer"
Background="{Binding BackgroundBrush}"
CornerRadius="8"
BorderBrush="{Binding SeparatorBrush}"
BorderThickness="1"
ClipToBounds="True">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="24"/>
<RowDefinition Height="1"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- ══ Header bar ════════════════════════════════════ -->
<Grid Grid.Row="0"
x:Name="HeaderBar"
Background="Transparent"
MouseLeftButtonDown="HeaderBar_MouseLeftButtonDown">
<!-- Status indicator (left) removed -->
<!-- Drag pill (center) -->
<Border Width="36" Height="3" CornerRadius="2"
Background="{Binding DragPillBrush}"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
<!-- Icons (right) -->
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<Button x:Name="SettingsBtn"
Style="{StaticResource HeaderIconBtn}"
Content=""
ToolTip="設定"
Command="{Binding ToggleSettingsCommand}"/>
<Button Style="{StaticResource HeaderIconBtn}"
Content=""
ToolTip="閉じる"
Command="{Binding CloseCommand}"/>
</StackPanel>
</Grid>
<!-- ══ Separator ═════════════════════════════════════ -->
<Border Grid.Row="1" Background="{Binding SeparatorBrush}"/>
<!-- ══ Caption display area ══════════════════════════ -->
<Grid Grid.Row="2">
<!-- Initializing state -->
<StackPanel Visibility="{Binding IsInitializing, Converter={StaticResource BoolToVis}}"
HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="{Binding StatusText}"
Foreground="#888888"
FontFamily="Segoe UI Variable, Segoe UI, Meiryo"
FontSize="13"
HorizontalAlignment="Center"
TextWrapping="Wrap"
Margin="24,0"/>
<!-- Download progress bar -->
<Grid Visibility="{Binding IsDownloading, Converter={StaticResource BoolToVis}}"
Margin="24,10,24,0">
<Border Background="{Binding SeparatorBrush}" Height="3" CornerRadius="1.5"/>
<Border Height="3" CornerRadius="1.5"
HorizontalAlignment="Left"
Background="#0067C0">
<Border.Width>
<MultiBinding>
<MultiBinding.Converter>
<conv:ProgressWidthConverter/>
</MultiBinding.Converter>
<Binding Path="DownloadProgress"/>
<Binding Path="ActualWidth" RelativeSource="{RelativeSource AncestorType=Grid}"/>
</MultiBinding>
</Border.Width>
</Border>
</Grid>
</StackPanel>
<!-- Caption text ScrollViewer -->
<ScrollViewer x:Name="CaptionScroller"
Visibility="{Binding IsInitializing, Converter={StaticResource BoolToVis}, ConverterParameter=Invert}"
VerticalScrollBarVisibility="Hidden"
HorizontalScrollBarVisibility="Disabled"
ScrollChanged="CaptionScroller_ScrollChanged"
Padding="18,8">
<Grid>
<!-- Placeholder when no captions yet -->
<TextBlock Text="{Binding PlaceholderText}"
FontFamily="Segoe UI Variable, Segoe UI, Meiryo" FontSize="14" Foreground="#888888"
HorizontalAlignment="Center" VerticalAlignment="Center"
TextWrapping="Wrap">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Visibility" Value="Visible"/>
<Style.Triggers>
<DataTrigger Binding="{Binding CaptionText, Converter={StaticResource NullOrEmptyToVis}}" Value="Visible">
<Setter Property="Visibility" Value="Collapsed"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock x:Name="CaptionTextBlock"
Text="{Binding CaptionText}"
Foreground="{Binding ForegroundBrush}"
FontFamily="Segoe UI Variable, Segoe UI, Meiryo"
FontSize="{Binding CaptionFontSize}"
FontWeight="Regular"
TextWrapping="Wrap"
LineHeight="Auto"
LineStackingStrategy="MaxHeight"/>
</Grid>
</ScrollViewer>
<!-- Status is now shown in header bar -->
<!-- Session info removed -->
</Grid>
<!-- ══ Settings popup ════════════════════════════════════ -->
<Popup x:Name="SettingsPopup"
PlacementTarget="{Binding ElementName=SettingsBtn}"
Placement="Bottom"
VerticalOffset="2"
IsOpen="{Binding IsSettingsOpen, Mode=TwoWay}"
StaysOpen="False"
AllowsTransparency="True"
PopupAnimation="Fade">
<Border Background="White"
CornerRadius="8"
Padding="18,14,18,18"
MinWidth="240"
MaxWidth="300"
BorderBrush="#E0E0E0"
BorderThickness="1">
<Border.Effect>
<DropShadowEffect BlurRadius="24" Opacity="0.15" ShadowDepth="8" Direction="270"/>
</Border.Effect>
<ScrollViewer VerticalScrollBarVisibility="Auto" MaxHeight="480">
<StackPanel>
<!-- ─ 表示位置 / Position ─────────────────── -->
<TextBlock Style="{StaticResource SettingsLabel}" Text="{Binding UI.LabelPosition}"/>
<WrapPanel Margin="0,0,0,2">
<ToggleButton Style="{StaticResource PillToggle}" Content="{Binding UI.PosTop}" Margin="0,0,6,4"
IsChecked="{Binding CurrentDisplayMode, Converter={StaticResource EnumToBool}, ConverterParameter=Top}"
Command="{Binding SetDisplayModeCommand}" CommandParameter="Top"/>
<ToggleButton Style="{StaticResource PillToggle}" Content="{Binding UI.PosBottom}" Margin="0,0,6,4"
IsChecked="{Binding CurrentDisplayMode, Converter={StaticResource EnumToBool}, ConverterParameter=Bottom}"
Command="{Binding SetDisplayModeCommand}" CommandParameter="Bottom"/>
<ToggleButton Style="{StaticResource PillToggle}" Content="{Binding UI.PosFloat}" Margin="0,0,0,4"
IsChecked="{Binding CurrentDisplayMode, Converter={StaticResource EnumToBool}, ConverterParameter=Floating}"
Command="{Binding SetDisplayModeCommand}" CommandParameter="Floating"/>
</WrapPanel>
<!-- ─ 外観 / Appearance ──────────────────── -->
<TextBlock Style="{StaticResource SettingsLabel}" Text="{Binding UI.LabelAppearance}"/>
<WrapPanel Margin="0,0,0,6">
<ToggleButton Style="{StaticResource PillToggle}" Content="{Binding UI.ThemeLight}" Margin="0,0,6,4"
IsChecked="{Binding CurrentTheme, Converter={StaticResource EnumToBool}, ConverterParameter=Light}"
Command="{Binding SetThemeCommand}" CommandParameter="Light"/>
<ToggleButton Style="{StaticResource PillToggle}" Content="{Binding UI.ThemeDark}" Margin="0,0,0,4"
IsChecked="{Binding CurrentTheme, Converter={StaticResource EnumToBool}, ConverterParameter=Dark}"
Command="{Binding SetThemeCommand}" CommandParameter="Dark"/>
</WrapPanel>
<TextBlock Style="{StaticResource SettingsLabel}" Text="{Binding UI.LabelOpacity}" Margin="0,0,0,3"/>
<Slider Style="{StaticResource DarkSlider}"
Minimum="0.1" Maximum="1.0" SmallChange="0.05" LargeChange="0.2"
Value="{Binding BackgroundOpacity, Mode=TwoWay}"
Width="Auto" Margin="0,0,0,4"/>
<!-- ─ オーディオソース / Audio source ────── -->
<TextBlock Style="{StaticResource SettingsLabel}" Text="{Binding UI.LabelAudio}"/>
<CheckBox Style="{StaticResource DarkCheckBox}"
Content="{Binding UI.AudioSystem}"
IsChecked="{Binding CaptureSystemAudio}"/>
<CheckBox Style="{StaticResource DarkCheckBox}"
Content="{Binding UI.AudioMic}"
IsChecked="{Binding CaptureMicrophone}"/>
<!-- ─ 文字サイズ / Text size ──────────────── -->
<TextBlock Style="{StaticResource SettingsLabel}" Text="{Binding UI.LabelFontSize}"/>
<WrapPanel>
<ToggleButton Style="{StaticResource PillToggle}" Content="{Binding UI.SizeSmall}" Margin="0,0,6,4"
IsChecked="{Binding CurrentFontSize, Converter={StaticResource EnumToBool}, ConverterParameter=Small}"
Command="{Binding SetFontSizeCommand}" CommandParameter="Small"/>
<ToggleButton Style="{StaticResource PillToggle}" Content="{Binding UI.SizeNormal}" Margin="0,0,6,4"
IsChecked="{Binding CurrentFontSize, Converter={StaticResource EnumToBool}, ConverterParameter=Normal}"
Command="{Binding SetFontSizeCommand}" CommandParameter="Normal"/>
<ToggleButton Style="{StaticResource PillToggle}" Content="{Binding UI.SizeLarge}" Margin="0,0,6,4"
IsChecked="{Binding CurrentFontSize, Converter={StaticResource EnumToBool}, ConverterParameter=Large}"
Command="{Binding SetFontSizeCommand}" CommandParameter="Large"/>
<ToggleButton Style="{StaticResource PillToggle}" Content="{Binding UI.SizeXL}" Margin="0,0,0,4"
IsChecked="{Binding CurrentFontSize, Converter={StaticResource EnumToBool}, ConverterParameter=ExtraLarge}"
Command="{Binding SetFontSizeCommand}" CommandParameter="ExtraLarge"/>
</WrapPanel>
<!-- ─ 文字起こし言語 / Transcription language -->
<TextBlock Style="{StaticResource SettingsLabel}" Text="{Binding UI.LabelTranscription}"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<ComboBox Grid.Column="0"
Style="{StaticResource DarkComboBox}"
ItemContainerStyle="{StaticResource DarkComboBoxItem}"
ItemsSource="{Binding Languages}"
SelectedItem="{Binding SelectedLanguage}"
Margin="0,0,8,0"/>
<Button Grid.Column="1"
Style="{StaticResource ApplyBtn}"
Content="{Binding UI.LabelApply}"
Command="{Binding ChangeLanguageCommand}"/>
</Grid>
<!-- ─ UI言語 / UI language ─────────────────── -->
<TextBlock Style="{StaticResource SettingsLabel}" Text="{Binding UI.LabelUILanguage}"/>
<WrapPanel>
<ToggleButton Style="{StaticResource PillToggle}" Content="日本語" Margin="0,0,6,4"
IsChecked="{Binding UILanguage, Converter={StaticResource EnumToBool}, ConverterParameter=ja}"
Command="{Binding SetUILanguageCommand}" CommandParameter="ja"/>
<ToggleButton Style="{StaticResource PillToggle}" Content="English" Margin="0,0,0,4"
IsChecked="{Binding UILanguage, Converter={StaticResource EnumToBool}, ConverterParameter=en}"
Command="{Binding SetUILanguageCommand}" CommandParameter="en"/>
</WrapPanel>
</StackPanel>
</ScrollViewer>
</Border>
</Popup>
</Grid>
</Border>
</Window>