[PT Run] Updated themes (dark/light/highcontrast) (#4119)

* Updated themes (dark/light/highcontrast)

* Updated semi-transparent colors to opague colors (for ClearType)

* Added theme brushes (light/dark/high contrast) for scrollbar.
This commit is contained in:
Niels Laute
2020-06-10 20:15:15 +02:00
committed by GitHub
parent 6fdfd3b9e7
commit d76234c112
9 changed files with 81 additions and 68 deletions

View File

@@ -1,20 +1,5 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Light theme -->
<SolidColorBrush x:Key="ThumbBrush" Color="#7a7a7a" />
<SolidColorBrush x:Key="ThumbPointerOverBrush" Color="#a0a0a0" />
<SolidColorBrush x:Key="ThumbPointerPressedBrush" Color="#747474" />
<!-- Dark theme -->
<!--<SolidColorBrush x:Key="ThumbBrush" Color="#7a7a7a" />
<SolidColorBrush x:Key="ThumbPointerOverBrush" Color="#767676" />
<SolidColorBrush x:Key="ThumbPointerPressedBrush" Color="#a4a4a4" /> -->
<!-- High contrast -->
<!--<SolidColorBrush x:Key="ThumbBrush" Color="#ffffff" />
<SolidColorBrush x:Key="ThumbPointerOverBrush" Color="#1aebff" />
<SolidColorBrush x:Key="ThumbPointerPressedBrush" Color="#1aebff" /> -->
<Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
<Setter Property="SnapsToDevicePixels" Value="True"/>
@@ -24,7 +9,7 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border x:Name="ThumbBorder" CornerRadius="2" Background="{DynamicResource ThumbBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" HorizontalAlignment="Right" Width="4" Margin="0,0,-1,0">
<Border x:Name="ThumbBorder" CornerRadius="2" Background="{DynamicResource ScrollBarThumbBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" HorizontalAlignment="Right" Width="4" Margin="0,0,-1,0">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates" >
<VisualStateGroup.Transitions>
@@ -48,10 +33,10 @@
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ThumbBorder" Property="CornerRadius" Value="0" />
<Setter TargetName="ThumbBorder" Property="Background" Value="{DynamicResource ThumbPointerOverBrush}" />
<Setter TargetName="ThumbBorder" Property="Background" Value="{DynamicResource ScrollBarThumbPointerOverBrush}" />
</Trigger>
<Trigger Property="IsMouseCaptured" Value="True">
<Setter TargetName="ThumbBorder" Property="Background" Value="{DynamicResource ThumbPointerPressedBrush}" />
<Setter TargetName="ThumbBorder" Property="Background" Value="{DynamicResource ScrollBarThumbPointerPressedBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>