Files
LlamaCasty/HotkeyConfigDialog.xaml
T
gramps 8502c1d194 design: app settings + dialogs to tokens (surface 5 of the sweep)
OverlayHost (the App Settings surface) and every dialog — Go Live, Socials, Mic picker, Camera
picker, Hotkey config, Reuse Image, Rename Recording, Keep Broadcast — now resolve from tokens.
That closes the last place the creator sees a dialog: the settings overlay was still wearing the
old palette while the main window had moved on.

Every #e94560 in these files was an ERROR or validation affordance (hotkey conflicts, socials
validation, the remove tooltip, the go-live error line) — six sites all borrowing the retired
brand red to mean "something is wrong". They are `error` now, which is what the standard says
red-adjacent means; live/record keeps `primary`.

Guard list extended to all nine files.
2026-10-30 08:29:28 -07:00

104 lines
5.4 KiB
XML

<Window x:Class="ytLive.HotkeyConfigDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Global Hotkey Bindings" Height="520" Width="480"
Icon="/Assets/llamacasty-icon.png"
WindowStartupLocation="CenterOwner" ResizeMode="NoResize"
ShowInTaskbar="False" Background="{StaticResource Brush.Background}">
<Window.Resources>
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
</Window.Resources>
<Grid Margin="24">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="Global Hotkey Bindings" FontSize="18" FontWeight="Bold"
Foreground="{StaticResource Brush.OnSurface}" Margin="0,0,0,12"/>
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
<ItemsControl ItemsSource="{Binding Rows}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="0,4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="180"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding ActionName}"
Foreground="{StaticResource Brush.OnSurface}" FontSize="13"
VerticalAlignment="Center" Margin="0,0,12,0"/>
<Button Grid.Column="1" Click="ChordButton_Click"
Tag="{Binding}" Cursor="Hand"
HorizontalAlignment="Left" MinWidth="140"
Padding="10,5" FontSize="13"
VerticalAlignment="Center">
<Border Background="{StaticResource Brush.SurfaceContainer}" CornerRadius="4" Padding="10,5">
<TextBlock Text="{Binding DisplayText}" Foreground="{StaticResource Brush.OnSurface}"
FontSize="13"/>
</Border>
</Button>
<Button Grid.Column="2" Content="✕" Click="UnbindButton_Click"
Tag="{Binding}" Cursor="Hand"
ToolTip="Remove binding"
FontSize="12" Foreground="{StaticResource Brush.OnSurfaceVariant}"
Background="Transparent" BorderThickness="0"
Padding="6,4" VerticalAlignment="Center">
<Button.Style>
<Style TargetType="Button">
<Style.Triggers>
<DataTrigger Binding="{Binding Chord}" Value="{x:Null}">
<Setter Property="Visibility" Value="Hidden"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
<!-- Conflict warning: hidden when no message -->
<Border Grid.Row="2" Background="{StaticResource Brush.ErrorContainer}" CornerRadius="4" Padding="10,8"
Margin="0,8,0,0" BorderBrush="{StaticResource Brush.Error}" BorderThickness="1">
<Border.Style>
<Style TargetType="Border">
<Style.Triggers>
<DataTrigger Binding="{Binding ConflictMessage}" Value="{x:Null}">
<Setter Property="Visibility" Value="Collapsed"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<TextBlock Text="{Binding ConflictMessage}" Foreground="{StaticResource Brush.Error}"
FontSize="12" TextWrapping="Wrap"/>
</Border>
<!-- Bottom buttons -->
<StackPanel Grid.Row="4" Orientation="Horizontal" Margin="0,12,0,0">
<Button Content="Reset to Defaults" Command="{Binding ResetToDefaultsCommand}"
Style="{StaticResource YtButtonSecondary}" Margin="0,0,8,0" FontSize="12"
Padding="12,6"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Button Content="Cancel" Command="{Binding CancelCommand}"
Style="{StaticResource YtButtonSecondary}" Margin="0,0,8,0"
IsCancel="True" Padding="12,6"/>
<Button Content="Save" Command="{Binding SaveCommand}"
Style="{StaticResource YtButton}" MinWidth="110" Padding="12,6"/>
</StackPanel>
</StackPanel>
</Grid>
</Window>