mirror of
https://github.com/par274/sharpemu.git
synced 2026-07-30 14:39:42 +08:00
35 lines
1.8 KiB
XML
35 lines
1.8 KiB
XML
<!--
|
|
Copyright (C) 2026 SharpEmu Emulator Project
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
Control theme for the shared launcher settings row.
|
|
-->
|
|
|
|
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:SharpEmu.GUI">
|
|
<ControlTheme x:Key="{x:Type local:SettingRow}" TargetType="local:SettingRow">
|
|
<Setter Property="Template">
|
|
<ControlTemplate>
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
<StackPanel VerticalAlignment="Center" Spacing="2" Margin="0,0,16,0">
|
|
<TextBlock x:Name="PART_Label" Text="{TemplateBinding Label}" FontSize="13" />
|
|
<TextBlock Text="{TemplateBinding Description}" FontSize="11"
|
|
Foreground="{StaticResource MutedBrush}" TextWrapping="Wrap"
|
|
IsVisible="{Binding Description, RelativeSource={RelativeSource TemplatedParent},
|
|
Converter={x:Static StringConverters.IsNotNullOrEmpty}}" />
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="10" VerticalAlignment="Center">
|
|
<ToggleSwitch OnContent="Override" OffContent="Override" MinWidth="0"
|
|
VerticalAlignment="Center"
|
|
IsVisible="{TemplateBinding ShowOverride}"
|
|
IsChecked="{Binding IsOverridden, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" />
|
|
<ContentPresenter x:Name="PART_Slot"
|
|
Content="{TemplateBinding Content}"
|
|
VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter>
|
|
</ControlTheme>
|
|
</ResourceDictionary>
|