mirror of
https://github.com/jellyfin/jellyfin-uwp.git
synced 2025-02-23 11:56:11 +00:00
333 lines
24 KiB
XML
333 lines
24 KiB
XML
<ResourceDictionary
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="using:Jellyfin.Resources">
|
|
|
|
<SolidColorBrush x:Key="Color0" Color="#101010" />
|
|
<SolidColorBrush x:Key="Color10" Color="#202020" />
|
|
<SolidColorBrush x:Key="Color20" Color="#303030" />
|
|
<SolidColorBrush x:Key="Color80" Color="#828282" />
|
|
<SolidColorBrush x:Key="Color90" Color="#a9a9a9" />
|
|
<SolidColorBrush x:Key="Color100" Color="#FFFFFF" />
|
|
<SolidColorBrush x:Key="PrimaryColor" Color="#00A4DC" />
|
|
<SolidColorBrush x:Key="PrimaryColorHover" Color="#0CB0E8" />
|
|
|
|
<x:Double x:Key="FontS">24</x:Double>
|
|
<x:Double x:Key="FontM">28</x:Double>
|
|
<x:Double x:Key="FontL">32</x:Double>
|
|
|
|
<FontFamily x:Key="JellyfinFamilyFont">/Fonts/NotoSans-Regular.ttf#Noto Sans</FontFamily>
|
|
|
|
<!-- Default style for Windows.UI.Xaml.Controls.Button -->
|
|
<Style x:Key="PrimaryButton" TargetType="Button">
|
|
<Setter Property="Background" Value="{ThemeResource ButtonBackground}" />
|
|
<Setter Property="Foreground" Value="{StaticResource Color100}" />
|
|
<Setter Property="BorderBrush" Value="{ThemeResource ButtonBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="{ThemeResource ButtonBorderThemeThickness}" />
|
|
<Setter Property="Padding" Value="8,4,8,4" />
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="FontFamily" Value="{StaticResource JellyfinFamilyFont}" />
|
|
<Setter Property="FontWeight" Value="Normal" />
|
|
<Setter Property="FontSize" Value="20" />
|
|
<Setter Property="UseSystemFocusVisuals" Value="True" />
|
|
<Setter Property="FocusVisualMargin" Value="-3" />
|
|
<Setter Property="Height" Value="60" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border x:Name="RootGrid" Background="{StaticResource PrimaryColor}" CornerRadius="4">
|
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal">
|
|
|
|
<Storyboard>
|
|
<PointerUpThemeAnimation Storyboard.TargetName="RootGrid" />
|
|
</Storyboard>
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="PointerOver">
|
|
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PrimaryColorHover}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<PointerUpThemeAnimation Storyboard.TargetName="RootGrid" />
|
|
</Storyboard>
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="Pressed">
|
|
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PrimaryColorHover}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<PointerDownThemeAnimation Storyboard.TargetName="RootGrid" />
|
|
</Storyboard>
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="Disabled">
|
|
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource Color20}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource Color80}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
|
|
</VisualStateManager.VisualStateGroups>
|
|
<ContentPresenter x:Name="ContentPresenter"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTransitions="{TemplateBinding ContentTransitions}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
Padding="{TemplateBinding Padding}"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
AutomationProperties.AccessibilityView="Raw" />
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="PrimaryTextBox" TargetType="TextBox">
|
|
<Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}" />
|
|
<Setter Property="MinHeight" Value="60" />
|
|
<Setter Property="Foreground" Value="{StaticResource Color100}" />
|
|
<Setter Property="Background" Value="{ThemeResource TextControlBackground}" />
|
|
<Setter Property="BorderBrush" Value="{ThemeResource TextControlBorderBrush}" />
|
|
<Setter Property="SelectionHighlightColor" Value="{ThemeResource TextControlSelectionHighlightColor}" />
|
|
<Setter Property="BorderThickness" Value="{ThemeResource TextControlBorderThemeThickness}" />
|
|
<Setter Property="FontFamily" Value="{StaticResource JellyfinFamilyFont}" />
|
|
<Setter Property="FontSize" Value="20" />
|
|
<Setter Property="ScrollViewer.HorizontalScrollMode" Value="Auto" />
|
|
<Setter Property="ScrollViewer.VerticalScrollMode" Value="Auto" />
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
|
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
|
|
<Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
|
|
<Setter Property="Padding" Value="{ThemeResource TextControlThemePadding}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="TextBox">
|
|
<Grid>
|
|
<Grid.Resources>
|
|
<Style x:Name="DeleteButtonStyle" TargetType="Button">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Grid x:Name="ButtonLayoutGrid"
|
|
BorderBrush="{ThemeResource TextControlButtonBorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
Background="{ThemeResource TextControlButtonBackground}">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal" />
|
|
<VisualState x:Name="PointerOver">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBackgroundPointerOver}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBorderBrushPointerOver}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonForegroundPointerOver}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBackgroundPressed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBorderBrushPressed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonForegroundPressed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled">
|
|
<Storyboard>
|
|
<DoubleAnimation Storyboard.TargetName="ButtonLayoutGrid"
|
|
Storyboard.TargetProperty="Opacity"
|
|
To="0"
|
|
Duration="0" />
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
<TextBlock x:Name="GlyphElement"
|
|
Foreground="{ThemeResource TextControlButtonForeground}"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
FontStyle="Normal"
|
|
FontSize="12"
|
|
Text=""
|
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
|
AutomationProperties.AccessibilityView="Raw" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Grid.Resources>
|
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
|
|
<VisualState x:Name="Disabled">
|
|
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderContentPresenter" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlHeaderForegroundDisabled}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBackgroundDisabled}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBorderBrushDisabled}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlForegroundDisabled}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContentPresenter" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding PlaceholderForeground, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={ThemeResource TextControlPlaceholderForegroundDisabled}}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Normal" />
|
|
|
|
<VisualState x:Name="PointerOver">
|
|
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBorderBrushPointerOver}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource Color20}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContentPresenter" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding PlaceholderForeground, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={ThemeResource TextControlPlaceholderForegroundPointerOver}}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Focused">
|
|
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContentPresenter" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding PlaceholderForeground, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={ThemeResource TextControlPlaceholderForegroundFocused}}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBackgroundFocused}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBorderBrushFocused}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlForegroundFocused}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="RequestedTheme">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Light" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="ButtonStates">
|
|
<VisualState x:Name="ButtonVisible">
|
|
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="DeleteButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0">
|
|
<DiscreteObjectKeyFrame.Value>
|
|
<Visibility>Visible</Visibility>
|
|
</DiscreteObjectKeyFrame.Value>
|
|
</DiscreteObjectKeyFrame>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="ButtonCollapsed" />
|
|
</VisualStateGroup>
|
|
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Border x:Name="BorderElement"
|
|
Grid.Row="1"
|
|
CornerRadius="4"
|
|
Background="{StaticResource Color10}"
|
|
BorderThickness="0"
|
|
Grid.ColumnSpan="2"
|
|
Grid.RowSpan="1" />
|
|
<ContentPresenter x:Name="HeaderContentPresenter"
|
|
x:DeferLoadStrategy="Lazy"
|
|
Visibility="Collapsed"
|
|
Grid.Row="0"
|
|
Foreground="{ThemeResource TextControlHeaderForeground}"
|
|
Margin="0,0,0,8"
|
|
Grid.ColumnSpan="2"
|
|
Content="{TemplateBinding Header}"
|
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
|
TextWrapping="{TemplateBinding TextWrapping}"
|
|
FontWeight="Normal" />
|
|
<ScrollViewer x:Name="ContentElement"
|
|
Grid.Row="1"
|
|
HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
|
|
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
|
VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
|
|
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
|
|
IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
|
|
IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
|
|
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
|
|
Margin="{TemplateBinding BorderThickness}"
|
|
Padding="{TemplateBinding Padding}"
|
|
VerticalAlignment="Center"
|
|
IsTabStop="False"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
ZoomMode="Disabled" />
|
|
<TextBlock x:Name="PlaceholderTextContentPresenter"
|
|
Grid.Row="1"
|
|
Foreground="{Binding PlaceholderForeground, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={ThemeResource TextControlPlaceholderForeground}}"
|
|
Margin="{TemplateBinding BorderThickness}"
|
|
Padding="{TemplateBinding Padding}"
|
|
Grid.ColumnSpan="2"
|
|
VerticalAlignment="Center"
|
|
Text="{TemplateBinding PlaceholderText}"
|
|
TextWrapping="{TemplateBinding TextWrapping}"
|
|
TextAlignment="{TemplateBinding TextAlignment}"
|
|
IsHitTestVisible="False" />
|
|
<Button x:Name="DeleteButton"
|
|
Grid.Row="1"
|
|
Style="{StaticResource DeleteButtonStyle}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
Margin="{ThemeResource HelperButtonThemePadding}"
|
|
IsTabStop="False"
|
|
Grid.Column="1"
|
|
Visibility="Collapsed"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
MinWidth="34"
|
|
VerticalAlignment="Stretch" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</ResourceDictionary>
|