mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
ImageResizer: fix Color contrast of ComboBox
This commit is contained in:
committed by
Andrey Nekrasov
parent
c103a8a205
commit
4228b9a772
@@ -31,6 +31,46 @@
|
||||
<Style TargetType="TextBox">
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
<Style x:Key="AccessibleComboBoxStyle" TargetType="ComboBoxItem">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ComboBoxItem}">
|
||||
<Border Name="SelectedItemBorder"
|
||||
Padding="2"
|
||||
SnapsToDevicePixels="true">
|
||||
<ContentPresenter />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSelected" Value="true">
|
||||
<Setter TargetName="SelectedItemBorder"
|
||||
Property="Background"
|
||||
Value="#FF91b9d8"/>
|
||||
<Setter Property="Foreground"
|
||||
Value="Black" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsHighlighted" Value="true">
|
||||
<Setter TargetName="SelectedItemBorder"
|
||||
Property="Background"
|
||||
Value="#FFdadada" />
|
||||
<Setter Property="Foreground"
|
||||
Value="Black" />
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="true" />
|
||||
<Condition Property="IsHighlighted" Value="true" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter TargetName="SelectedItemBorder"
|
||||
Property="Background"
|
||||
Value="#FF619ccb"/>
|
||||
<Setter Property="Foreground"
|
||||
Value="Black" />
|
||||
</MultiTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Application.Resources>
|
||||
|
||||
</Application>
|
||||
|
||||
@@ -55,7 +55,8 @@
|
||||
<ComboBox Height="23"
|
||||
Margin="5,0,0,0"
|
||||
ItemsSource="{Binding Source={StaticResource ResizeFitValues}}"
|
||||
SelectedItem="{Binding Fit}">
|
||||
SelectedItem="{Binding Fit}"
|
||||
ItemContainerStyle="{StaticResource AccessibleComboBoxStyle}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type m:ResizeFit}">
|
||||
<ContentPresenter Content="{Binding Converter={StaticResource EnumValueConverter}}"/>
|
||||
@@ -97,7 +98,8 @@
|
||||
<ComboBox Height="23"
|
||||
Margin="7,0,0,0"
|
||||
ItemsSource="{Binding Source={StaticResource ResizeUnitValues}}"
|
||||
SelectedItem="{Binding Unit}">
|
||||
SelectedItem="{Binding Unit}"
|
||||
ItemContainerStyle="{StaticResource AccessibleComboBoxStyle}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type m:ResizeUnit}">
|
||||
<ContentPresenter Content="{Binding Converter={StaticResource EnumValueConverter}}"/>
|
||||
|
||||
Reference in New Issue
Block a user