Skip to content

Commit

Permalink
v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Tally authored Aug 7, 2020
1 parent 3d98063 commit e9af133
Show file tree
Hide file tree
Showing 10 changed files with 468 additions and 236 deletions.
33 changes: 25 additions & 8 deletions Constants.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<Thickness x:Key="PopupBorderThickness">1</Thickness>
<Thickness x:Key="ControlBorderThickness">1</Thickness>
<sys:Double x:Key="EllipseBorderThickness">1</sys:Double>
<sys:Double x:Key="ControlCornerRadiusDouble">2</sys:Double>
<CornerRadius x:Key="ControlCornerRadius">2</CornerRadius>
<sys:Double x:Key="GroupSeparatorOpacity">1</sys:Double>

Expand All @@ -21,7 +22,7 @@
<FontFamily x:Key="SymbolFont">segoeuisym.ttf#Segoe UI Symbol</FontFamily>

<!-- Effectively the Accent Color: #AARRGGBB, #RRGGBB, & Web safe colors are accepted. -->
<!-- For grey try: #A6A6A6, for gold try #F3C443, Playnite Icon red is #FB1F51 for default blue try #55CDFF -->
<!-- For grey try: #A6A6A6, for gold try #FFD768, #EF424B, for blue try #4D8BAF -->
<Color x:Key="GlyphColor">#55CDFF</Color>

<!-- Currently Unused -->
Expand All @@ -40,32 +41,48 @@
<Color x:Key="BackgroundToneColor">#171717</Color>
<Color x:Key="GridItemBackgroundColor">#636363</Color>
<Color x:Key="PanelSeparatorColor">#2B2B2B</Color>
<Color x:Key="PlayButtonColor">#4BC937</Color>
<Color x:Key="PlayButtonHighlightColor">#6AD959</Color>
<Color x:Key="InstallButtonColor">#3F47A8</Color>
<Color x:Key="InstallButtonHighlightColor">#5C63BB</Color>
<Color x:Key="PanelBackgroundColor">#191919</Color>
<Color x:Key="DetailsButtonBackGround">#626262</Color>
<Color x:Key="NormalBorderColor">#535353</Color>
<Color x:Key="ButtonBackgroundColor">#333333</Color>
<Color x:Key="DetailsButtonBackGround">#4D4D4D</Color>

<SolidColorBrush x:Key="ControlBackgroundBrush" Color="Transparent" />
<SolidColorBrush x:Key="TextBrush" Color="{DynamicResource TextColor}" />
<SolidColorBrush x:Key="TextBrushDarker" Color="{DynamicResource TextColorDarker}" />
<SolidColorBrush x:Key="TextBrushDark" Color="{DynamicResource TextColorDark}" />
<SolidColorBrush x:Key="NormalBrush" Color="{DynamicResource MainColor}" />
<SolidColorBrush x:Key="NormalBrushDark" Color="{DynamicResource MainColorDark}" />
<SolidColorBrush x:Key="NormalBorderBrush" Color="#535353" />
<SolidColorBrush x:Key="NormalBorderBrush" Color="{DynamicResource NormalBorderColor}" />
<SolidColorBrush x:Key="HoverBrush" Color="{DynamicResource HoverColor}" />
<SolidColorBrush x:Key="GlyphBrush" Color="{DynamicResource GlyphColor}" />
<SolidColorBrush x:Key="HighlightGlyphBrush" Color="{DynamicResource HighlightGlyphColor}" />
<SolidColorBrush x:Key="PopupBorderBrush" Color="{DynamicResource PopupBorderColor}" />
<SolidColorBrush x:Key="TooltipBackgroundBrush" Color="{DynamicResource BackgroundToneColor}" />
<SolidColorBrush x:Key="ButtonBackgroundBrush" Color="#171717" />
<SolidColorBrush x:Key="GridItemBackgroundBrush" Color="{DynamicResource GridItemBackgroundColor}" Opacity=".5 "/>
<SolidColorBrush x:Key="ButtonBackgroundBrush" Color="{DynamicResource ButtonBackgroundColor}" />
<SolidColorBrush x:Key="ButtonBorderBrush" Color="{DynamicResource NormalBorderColor}" />
<SolidColorBrush x:Key="GridItemBackgroundBrush" Color="{DynamicResource GridItemBackgroundColor}" Opacity=".7 "/>
<SolidColorBrush x:Key="PanelSeparatorBrush" Color="{DynamicResource PanelSeparatorColor}" Opacity=".5"/>
<SolidColorBrush x:Key="PanelBackgroundBrush" Color="{DynamicResource PanelBackgroundColor}" Opacity=".5" />
<SolidColorBrush x:Key="PopupBackgroundBrush" Color="{DynamicResource PopupBackgroundColor}" />
<SolidColorBrush x:Key="DetailsPanelBrush" Color="{DynamicResource PanelBackgroundColor}" Opacity=".5" />
<SolidColorBrush x:Key="PlayButtonBrush" Color="#19B14E" />
<SolidColorBrush x:Key="PlayBorderBrush" Color="#C1FFCB" />
<SolidColorBrush x:Key="DetailsPanelBrush" Color="{DynamicResource PopupBackgroundColor}" Opacity=".5" />
<SolidColorBrush x:Key="PlayButtonBrush" Color="{DynamicResource PlayButtonColor}" Opacity=".7" />
<SolidColorBrush x:Key="PlayBorderBrush" Color="{DynamicResource PlayButtonColor}" Opacity="1" />
<SolidColorBrush x:Key="PlayButtonHighlightBrush" Color="{DynamicResource PlayButtonHighlightColor}" />
<SolidColorBrush x:Key="PlayBorderHighlightBrush" Color="{DynamicResource PlayButtonHighlightColor}" />
<SolidColorBrush x:Key="InstallButtonBrush" Color="{DynamicResource InstallButtonColor}" />
<SolidColorBrush x:Key="InstallBorderBrush" Color="{DynamicResource InstallButtonColor}" />
<SolidColorBrush x:Key="InstallButtonHighlightBrush" Color="{DynamicResource InstallButtonColor}" />
<SolidColorBrush x:Key="InstallBorderHighlightBrush" Color="{DynamicResource InstallButtonColor}" />
<SolidColorBrush x:Key="TitlebarBrush" Color="{DynamicResource PanelBackgroundColor}" Opacity="1"/>
<SolidColorBrush x:Key="DisabledBackgroundBrush" Color="{DynamicResource MainColorDark}" />
<SolidColorBrush x:Key="DetailsButtonBrush" Color="{DynamicResource DetailsButtonBackGround}" Opacity=".7"/>
<SolidColorBrush x:Key="DetailsButtonBorderBrush" Color="{DynamicResource DetailsButtonBackGround}" Opacity="1"/>
<SolidColorBrush x:Key="DetailHighlightBrush" Color="#A6A6A6" Opacity=".7"/>
<SolidColorBrush x:Key="DetailHighlightBorderBrush" Color="#A6A6A6" Opacity="1"/>
<SolidColorBrush x:Key="DetailsViewGroupTextBrush" Color="{DynamicResource GlyphColor}" />

<SolidColorBrush x:Key="PositiveRatingBrush" Color="#78ffa0" />
Expand Down
80 changes: 75 additions & 5 deletions DefaultControls/Button.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,102 @@
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource BaseStyle}">
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundBrush}" />
<Setter Property="Foreground" Value="{DynamicResource GlyphBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderBrush}" />
<Setter Property="BorderThickness" Value="{DynamicResource ControlBorderThickness}" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Padding" Value="10,5,10,5" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="Border" Cursor="Hand" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"
CornerRadius="{DynamicResource ControlCornerRadius}" Style="{DynamicResource HighlightBorder}">
CornerRadius="{DynamicResource ControlCornerRadius}" Style="{DynamicResource HighlightBorder}" BorderBrush="{TemplateBinding BorderBrush}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsFocused" Value="True">
<Setter Property="BorderBrush" Value="{DynamicResource GlyphBrush}" TargetName="Border" />
<Setter Property="BorderBrush" Value="{DynamicResource GlyphBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
<Setter Property="Background" Value="{DynamicResource HoverBrush}" />
<Setter Property="Foreground" Value="{DynamicResource TextBrush}"/>
<Setter Property="Background" Value="{DynamicResource HoverBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="PanelButton" TargetType="{x:Type Button}" BasedOn="{StaticResource BaseStyle}">
<Setter Property="Background" Value="{DynamicResource DetailsButtonBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource TextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource DetailsButtonBorderBrush}" />
<Setter Property="BorderThickness" Value="{DynamicResource ControlBorderThickness}" />
<Setter Property="TextOptions.TextRenderingMode" Value="Aliased"/>
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="FontSize" Value="18"/>
<Setter Property="MinWidth" Value="40" />
<Setter Property="MinHeight" Value="40" />
<Setter Property="Padding" Value="10,5,10,5" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="Border" Cursor="Hand" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"
CornerRadius="{DynamicResource ControlCornerRadius}" BorderBrush="{TemplateBinding BorderBrush}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsFocused" Value="True">
<Setter Property="BorderBrush" Value="{DynamicResource DetailHighlightBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource DetailHighlightBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource DetailHighlightBorderBrush}"/>
</Trigger>
</Style.Triggers>
</Style>

<Style x:Key="DetailsButton" TargetType="Button" BasedOn="{StaticResource PanelButton}">
<Setter Property="Padding" Value="5"/>
</Style>

<Style x:Key="DetailsPlayButton" TargetType="Button" BasedOn="{StaticResource DetailsButton}">
<Setter Property="MinWidth" Value="120"/>
<Setter Property="Padding" Value="30,5,30,5"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{DynamicResource TextBrush}"/>
<Setter Property="Background" Value="{DynamicResource PlayButtonBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource PlayBorderBrush}"/>
</Trigger>
<Trigger Property="IsFocused" Value="True">
<Setter Property="Foreground" Value="{DynamicResource TextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource PlayBorderBrush}"/>
</Trigger>
</Style.Triggers>
</Style>

<Style x:Key="DetailsEditButton" TargetType="Button" BasedOn="{StaticResource DetailsButton}">
<Setter Property="Margin" Value="0,-5,-5,0" />
<Setter Property="Height" Value="40" />
<Setter Property="Focusable" Value="False"/>
<Setter Property="Content" Value="&#xeded;"/>
<Setter Property="FontFamily" Value="{DynamicResource FontIcoFont}"/>
<Setter Property="Visibility" Value="Hidden" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType=StackPanel}}" Value="True">
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
</Style.Triggers>
</Style>
</ResourceDictionary>
Loading

0 comments on commit e9af133

Please sign in to comment.