0
0
mirror of https://github.com/sp-tarkov/launcher.git synced 2025-02-13 09:50:43 -05:00
waffle.lord 63f9b02fc4 update all styles
using dynamic resource dictionary for theme variants
2024-07-07 09:37:37 -04:00

501 lines
20 KiB
XML

<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cc="using:SPT.Launcher.CustomControls"
>
<Design.PreviewWith>
<Grid Background="{DynamicResource BackgroundBrush}">
<StackPanel Spacing="5" Margin="50">
<Label Content="Some label here"/>
<Label Content="Some acc label here" Classes="acc"/>
<Label Content="Some alt label here" Classes="alt"/>
<Label Classes="versionMismatch" Content="invalid version tag" />
<Button Content="button" />
<Button Content="acc button" Classes="acc"/>
<Button Content="alt button" Classes="alt"/>
<Button Content="link button" Classes="link"/>
<Button Classes="profileinfo" Content="profile info button"/>
<ComboBox SelectedIndex="0">
<ComboBoxItem>Item 1</ComboBoxItem>
<ComboBoxItem>Item 2</ComboBoxItem>
<ComboBoxItem>Item 3</ComboBoxItem>
</ComboBox>
<TextBox Text="Some cool text here" Margin="5" />
<TextBox Watermark="This is a watermark" Margin="5" />
<CheckBox Content="unchecked" />
<CheckBox Content="checked" IsChecked="True"/>
<ProgressBar Value="40" />
<ProgressBar IsIndeterminate="True" />
<ProgressBar Classes="error" />
</StackPanel>
</Grid>
</Design.PreviewWith>
<!-- Add Styles Here -->
<!-- Notification Manager Styles -->
<Style Selector="WindowNotificationManager">
<Setter Property="Margin" Value="0 35 0 0"/>
<!-- <Setter Property="VerticalAlignment" Value="Bottom"/> -->
<!-- <Setter Property="HorizontalAlignment" Value="Center"/> -->
<Setter Property="MaxItems" Value="2"/>
</Style>
<!-- NotificationCard Styles -->
<Style Selector="NotificationCard">
<Setter Property="Template">
<ControlTemplate>
<LayoutTransformControl Name="PART_LayoutTransformControl" UseRenderTransform="True">
<Border CornerRadius="{DynamicResource ControlCornerRadius}" BoxShadow="0 6 8 0 #4F000000" Margin="5 5 5 10">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{DynamicResource ControlCornerRadius}" ClipToBounds="True">
<DockPanel>
<ContentControl Name="PART_Content" Content="{TemplateBinding Content}" />
</DockPanel>
</Border>
</Border>
</LayoutTransformControl>
</ControlTemplate>
</Setter>
<!-- <Style.Animations> -->
<!-- <Animation Duration="0:0:0.45" Easing="SineEaseIn" FillMode="Forward"> -->
<!-- <KeyFrame Cue="0%"> -->
<!-- <Setter Property="Opacity" Value="0"/> -->
<!-- <Setter Property="ZIndex" Value="0"/> -->
<!-- <Setter Property="TranslateTransform.Y" Value="-100"/> -->
<!-- <Setter Property="ScaleTransform.ScaleX" Value="1"/> -->
<!-- <Setter Property="ScaleTransform.ScaleY" Value="1"/> -->
<!-- </KeyFrame> -->
<!-- <KeyFrame Cue="30%"> -->
<!-- <Setter Property="Opacity" Value="0"/> -->
<!-- </KeyFrame> -->
<!-- <KeyFrame Cue="99%"> -->
<!-- <Setter Property="ZIndex" Value="0"/> -->
<!-- </KeyFrame> -->
<!-- <KeyFrame Cue="100%"> -->
<!-- <Setter Property="Opacity" Value="1"/> -->
<!-- <Setter Property="ZIndex" Value="1"/> -->
<!-- <Setter Property="TranslateTransform.Y" Value="0"/> -->
<!-- <Setter Property="ScaleTransform.ScaleX" Value="1"/> -->
<!-- <Setter Property="ScaleTransform.ScaleY" Value="1"/> -->
<!-- </KeyFrame> -->
<!-- </Animation> -->
<!-- </Style.Animations> -->
</Style>
<!-- <Style Selector="NotificationCard[IsClosing=true] /template/ LayoutTransformControl#PART_LayoutTransformControl"> -->
<!-- <Style.Animations> -->
<!-- <Animation Duration="0:0:0.3" Easing="SineEaseOut" FillMode="Backward"> -->
<!-- <KeyFrame Cue="0%"> -->
<!-- <Setter Property="Opacity" Value="1"/> -->
<!-- <Setter Property="TranslateTransform.X" Value="0"/> -->
<!-- <Setter Property="TranslateTransform.Y" Value="0"/> -->
<!-- </KeyFrame> -->
<!-- <KeyFrame Cue="100%"> -->
<!-- <Setter Property="Opacity" Value="0"/> -->
<!-- <Setter Property="TranslateTransform.X" Value="0"/> -->
<!-- <Setter Property="TranslateTransform.Y" Value="-100"/> -->
<!-- </KeyFrame> -->
<!-- </Animation> -->
<!-- </Style.Animations> -->
<!-- </Style> -->
<!-- TitleBar Styles -->
<Style Selector="cc|TitleBar">
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource ForegroundBrush}"/>
<Setter Property="ButtonForeground" Value="{DynamicResource AltAccentBrush}"/>
</Style>
<Style Selector="cc|TitleBar.versiontag">
<Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}"/>
<Setter Property="BorderThickness" Value="0 0 0 2"/>
</Style>
<!-- TextBox Styles -->
<Style Selector="TextBox">
<Setter Property="Background" Value="{DynamicResource BackgroundBrush2}"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Foreground" Value="{DynamicResource ForegroundBrush}"/>
</Style>
<Style Selector="TextBox:focus">
<Setter Property="Foreground" Value="{DynamicResource ForegroundBrush}"/>
</Style>
<Style Selector="TextBox:pointerover">
<Setter Property="Foreground" Value="{DynamicResource ForegroundBrush}"/>
</Style>
<Style Selector="TextBox:pointerover /template/ Border#PART_BorderElement">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="{DynamicResource AltAccentBrush}"/>
</Style>
<Style Selector="TextBox:pointerover /template/ TextBlock#PART_Watermark, TextBox:focus /template/ TextBlock#PART_FloatingWatermark">
<Setter Property="Foreground" Value="{DynamicResource AltAccentBrush2}"/>
</Style>
<Style Selector="TextBox:focus /template/ TextBlock#PART_Watermark, TextBox:focus /template/ TextBlock#PART_FloatingWatermark">
<Setter Property="Foreground" Value="{DynamicResource AltAccentBrush3}"/>
</Style>
<Style Selector="TextBox /template/ TextBlock#PART_Watermark, TextBox:focus /template/ TextBlock#PART_FloatingWatermark">
<Setter Property="Foreground" Value="White"/>
</Style>
<Style Selector="TextBox:focus /template/ Border#PART_BorderElement">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
<!-- Label Styles -->
<Style Selector="Label">
<Setter Property="Foreground" Value="{DynamicResource ForegroundBrush}"/>
</Style>
<Style Selector="Label.acc">
<Setter Property="Foreground" Value="{DynamicResource AccentBrush}"/>
</Style>
<Style Selector="Label.alt">
<Setter Property="Foreground" Value="{DynamicResource AltAccentBrush}"/>
</Style>
<Style Selector="Label.versionMismatch">
<Setter Property="Foreground" Value="OrangeRed"/>
</Style>
<!-- ProgressBar Styles -->
<Style Selector="ProgressBar">
<Setter Property="Foreground" Value="{DynamicResource AccentBrush3}"/>
<Setter Property="Background" Value="{DynamicResource BackgroundBrush2}"/>
</Style>
<Style Selector="ProgressBar.error">
<Setter Property="Foreground" Value="Red"/>
<Style.Animations>
<Animation Duration="0:0:0.5" FillMode="Forward">
<KeyFrame Cue="0%">
<Setter Property="Value" Value="0"/>
</KeyFrame>
<KeyFrame Cue="100%">
<Setter Property="Value" Value="100"/>
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
<!-- Seperator Styles -->
<Style Selector="Separator">
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
</Style>
<!-- Button Styles -->
<Style Selector="Button">
<Setter Property="Background" Value="{DynamicResource BackgroundBrush2}"/>
<Setter Property="Foreground" Value="{DynamicResource ForegroundBrush}"/>
</Style>
<Style Selector="Button:pointerover">
<Setter Property="FontWeight" Value="SemiBold"/>
</Style>
<Style Selector="Button:pointerover /template/ ContentPresenter">
<Setter Property="Background" Value="{DynamicResource BackgroundBrush2}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AccentBrush2}"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
<Style Selector="Button:pressed /template/ ContentPresenter">
<Setter Property="Background" Value="{DynamicResource AccentBrush}"/>
</Style>
<Style Selector="Button:disabled /template/ ContentPresenter">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush2}"/>
</Style>
<!-- Button acc -->
<Style Selector="Button.acc">
<Setter Property="Background" Value="{DynamicResource AccentBrush2}"/>
<Setter Property="Foreground" Value="{DynamicResource ForegroundBrush}"/>
<Setter Property="FontWeight" Value="SemiBold"/>
</Style>
<Style Selector="Button.acc:pointerover">
<Setter Property="FontWeight" Value="SemiBold"/>
</Style>
<Style Selector="Button.acc:pointerover /template/ ContentPresenter">
<Setter Property="Background" Value="{DynamicResource AccentBrush3}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush2}"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
<Style Selector="Button.acc:pressed /template/ ContentPresenter">
<Setter Property="Background" Value="{DynamicResource AccentBrush}"/>
</Style>
<Style Selector="Button.acc:disabled /template/ ContentPresenter">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush2}"/>
</Style>
<!-- Button alt -->
<Style Selector="Button.alt">
<Setter Property="Background" Value="{DynamicResource AltAccentBrush2}"/>
<Setter Property="Foreground" Value="{DynamicResource ForegroundBrush}"/>
<Setter Property="FontWeight" Value="SemiBold"/>
</Style>
<Style Selector="Button.alt:pointerover">
<Setter Property="FontWeight" Value="SemiBold"/>
</Style>
<Style Selector="Button.alt:pointerover /template/ ContentPresenter">
<Setter Property="Background" Value="{DynamicResource AltAccentBrush3}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush2}"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
<Style Selector="Button.alt:pressed /template/ ContentPresenter">
<Setter Property="Background" Value="{DynamicResource AltAccentBrush}"/>
</Style>
<Style Selector="Button.alt:disabled /template/ ContentPresenter">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush2}"/>
</Style>
<!-- Button Link Style -->
<Style Selector="Button.link">
<Setter Property="TextBlock.TextDecorations" Value="Underline"/>
<Setter Property="Foreground" Value="{DynamicResource AltAccentBrush3}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
</Style>
<Style Selector="Button.link:pointerover /template/ ContentPresenter">
<Setter Property="TextBlock.Foreground" Value="{DynamicResource AccentBrush3}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
</Style>
<Style Selector="Button.link:pressed /template/ ContentPresenter">
<Setter Property="TextBlock.Foreground" Value="{DynamicResource AccentBrush}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
</Style>
<!-- Button Bordered Link Style -->
<!-- <Style Selector="Button.borderedlink"> -->
<!-- <Setter Property="Foreground" Value="{DynamicResource ForegroundBrush}"/> -->
<!-- <Setter Property="Background" Value="Transparent"/> -->
<!-- <Setter Property="BorderBrush" Value="{DynamicResource ForegroundBrush}"/> -->
<!-- <Setter Property="BorderThickness" Value="1"/> -->
<!-- </Style> -->
<!-- -->
<!-- <Style Selector="Button.borderedlink:pointerover /template/ ContentPresenter"> -->
<!-- <Setter Property="TextBlock.Foreground" Value="{DynamicResource AccentBrush}"/> -->
<!-- <Setter Property="Background" Value="Transparent"/> -->
<!-- <Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}"/> -->
<!-- </Style> -->
<!-- -->
<!-- <Style Selector="Button.borderedlink:pressed /template/ ContentPresenter"> -->
<!-- <Setter Property="TextBlock.Foreground" Value="{DynamicResource BackgroundBrush2}"/> -->
<!-- <Setter Property="Background" Value="Transparent"/> -->
<!-- <Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush2}"/> -->
<!-- <Setter Property="BorderThickness" Value="0"/> -->
<!-- </Style> -->
<!-- Button Profile Info Style -->
<Style Selector="Button.profileinfo">
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush}"/>
</Style>
<Style Selector="Button.icon">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
</Style>
<Style Selector="Button.icon:pointerover">
<Setter Property="Background" Value="{DynamicResource BackgroundBrush2}"/>
</Style>
<!-- Checkbox styles -->
<Style Selector="CheckBox">
<Setter Property="Foreground" Value="{DynamicResource ForegroundBrush}"/>
</Style>
<Style Selector="CheckBox /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush2}"/>
</Style>
<Style Selector="CheckBox:pointerover /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}"/>
</Style>
<Style Selector="CheckBox:checked">
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Foreground" Value="{DynamicResource AccentBrush3}"/>
</Style>
<Style Selector="CheckBox:checked /template/ Border#NormalRectangle">
<Setter Property="Background" Value="{DynamicResource BackgroundBrush2}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AccentBrush3}"/>
</Style>
<Style Selector="CheckBox:checked /template/ Path#CheckGlyph">
<Setter Property="Fill" Value="{DynamicResource AccentBrush3}"/>
</Style>
<!-- ComboBox Styles -->
<Style Selector="ComboBox">
<Setter Property="Foreground" Value="{DynamicResource ForegroundBrush}"/>
<Setter Property="PlaceholderForeground" Value="{DynamicResource ForegroundBrush}"/>
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
<Setter Property="Template">
<ControlTemplate>
<DataValidationErrors>
<Grid RowDefinitions="Auto, *, Auto"
ColumnDefinitions="*,32">
<ContentPresenter x:Name="HeaderContentPresenter"
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2"
IsVisible="False"
TextBlock.FontWeight="{DynamicResource ComboBoxHeaderThemeFontWeight}"
Margin="{DynamicResource ComboBoxTopHeaderMargin}"
VerticalAlignment="Top" />
<Border x:Name="Background"
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"
MinWidth="{DynamicResource ComboBoxThemeMinWidth}" />
<Border x:Name="HighlightBackground"
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
Background="{DynamicResource AltBackgroundBrush}"
BorderBrush="{DynamicResource AltAccentBrush2}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}" />
<TextBlock x:Name="PlaceholderTextBlock"
Grid.Row="1"
Grid.Column="0"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Margin="{TemplateBinding Padding}"
Text="{TemplateBinding PlaceholderText}"
Foreground="{TemplateBinding PlaceholderForeground}"
IsVisible="{TemplateBinding SelectionBoxItem, Converter={x:Static ObjectConverters.IsNull}}" />
<ContentControl x:Name="ContentPresenter"
Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding ItemTemplate}"
Grid.Row="1"
Grid.Column="0"
Margin="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
<Border x:Name="DropDownOverlay"
Grid.Row="1"
Grid.Column="1"
Background="Transparent"
Margin="0,1,1,1"
Width="30"
IsVisible="False"
HorizontalAlignment="Right" />
<Viewbox UseLayoutRounding="False"
MinHeight="{DynamicResource ComboBoxMinHeight}"
Grid.Row="1"
Grid.Column="1"
IsHitTestVisible="False"
Margin="0,0,10,0"
Height="12"
Width="12"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<Panel>
<Panel Height="12"
Width="12" />
<Path x:Name="DropDownGlyph"
VerticalAlignment="Center"
Data="M1939 486L2029 576L1024 1581L19 576L109 486L1024 1401L1939 486Z"
/>
</Panel>
</Viewbox>
<Popup Name="PART_Popup"
WindowManagerAddShadowHint="False"
IsOpen="{TemplateBinding IsDropDownOpen, Mode=TwoWay}"
MinWidth="{Binding Bounds.Width, RelativeSource={RelativeSource TemplatedParent}}"
MaxHeight="{TemplateBinding MaxDropDownHeight}"
PlacementTarget="Background"
IsLightDismissEnabled="True">
<Border x:Name="PopupBorder"
Background="{DynamicResource BackgroundBrush2}"
BorderBrush="{DynamicResource BackgroundBrush2}"
BorderThickness="{DynamicResource ComboBoxDropdownBorderThickness}"
Margin="0,-1,0,-1"
Padding="{DynamicResource ComboBoxDropdownBorderPadding}"
HorizontalAlignment="Stretch"
CornerRadius="{DynamicResource OverlayCornerRadius}">
<ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
<ItemsPresenter Name="PART_ItemsPresenter"
Margin="{DynamicResource ComboBoxDropdownContentMargin}"
ItemsPanel="{TemplateBinding ItemsPanel}"
/>
</ScrollViewer>
</Border>
</Popup>
</Grid>
</DataValidationErrors>
</ControlTemplate>
</Setter>
</Style>
<Style Selector="ComboBox /template/ Path#DropDownGlyph">
<Setter Property="Fill" Value="{DynamicResource ForegroundBrush}" />
</Style>
<Style Selector="ComboBox:pointerover /template/ Path#DropDownGlyph">
<Setter Property="Fill" Value="{DynamicResource AccentBrush3}" />
</Style>
<Style Selector="ComboBox:pointerover">
<Setter Property="Foreground" Value="{DynamicResource AccentBrush3}"/>
</Style>
<!-- ComboBoxItem Styles -->
<Style Selector="ComboBoxItem">
<Setter Property="Foreground" Value="{DynamicResource ForegroundBrush}"/>
<Setter Property="Background" Value="{DynamicResource BackgroundBrush2}"/>
</Style>
<Style Selector="ComboBoxItem:pointerover /template/ ContentPresenter">
<Setter Property="Background" Value="{DynamicResource AltAccentBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource BackgroundBrush2}" />
<Setter Property="TextBlock.Foreground" Value="{DynamicResource ForegroundBrush}" />
</Style>
<Style Selector="ComboBoxItem:selected /template/ ContentPresenter">
<Setter Property="Background" Value="{DynamicResource AccentBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}" />
<Setter Property="TextBlock.Foreground" Value="{DynamicResource ForegroundBrush}" />
</Style>
</Styles>