Browse Source
Show checkerboard background for transparent color palette items (#21613)
pull/21728/head
Jaex
3 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
48 additions and
32 deletions
-
src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPicker.xaml
-
src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorView.xaml
-
src/Avalonia.Controls.ColorPicker/Themes/Simple/ColorPicker.xaml
-
src/Avalonia.Controls.ColorPicker/Themes/Simple/ColorView.xaml
|
|
|
@ -182,14 +182,18 @@ |
|
|
|
Margin="12"> |
|
|
|
<ListBox.ItemTemplate> |
|
|
|
<DataTemplate DataType="{x:Type Color}"> |
|
|
|
<Border AutomationProperties.Name="{Binding Converter={StaticResource ColorToDisplayNameConverter}}" |
|
|
|
ToolTip.Tip="{Binding Converter={StaticResource ColorToDisplayNameConverter}}" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
VerticalAlignment="Stretch"> |
|
|
|
<Border.Background> |
|
|
|
<SolidColorBrush Color="{Binding}" /> |
|
|
|
</Border.Background> |
|
|
|
</Border> |
|
|
|
<Panel AutomationProperties.Name="{Binding Converter={StaticResource ColorToDisplayNameConverter}}" |
|
|
|
ToolTip.Tip="{Binding Converter={StaticResource ColorToDisplayNameConverter}}" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
VerticalAlignment="Stretch"> |
|
|
|
<Border Background="{StaticResource ColorControlCheckeredBackgroundBrush}" /> |
|
|
|
<Border HorizontalAlignment="Stretch" |
|
|
|
VerticalAlignment="Stretch"> |
|
|
|
<Border.Background> |
|
|
|
<SolidColorBrush Color="{Binding}" /> |
|
|
|
</Border.Background> |
|
|
|
</Border> |
|
|
|
</Panel> |
|
|
|
</DataTemplate> |
|
|
|
</ListBox.ItemTemplate> |
|
|
|
<ListBox.ItemsPanel> |
|
|
|
|
|
|
|
@ -426,14 +426,18 @@ |
|
|
|
Margin="12"> |
|
|
|
<ListBox.ItemTemplate> |
|
|
|
<DataTemplate DataType="{x:Type Color}"> |
|
|
|
<Border AutomationProperties.Name="{Binding Converter={StaticResource ColorToDisplayNameConverter}}" |
|
|
|
ToolTip.Tip="{Binding Converter={StaticResource ColorToDisplayNameConverter}}" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
VerticalAlignment="Stretch"> |
|
|
|
<Border.Background> |
|
|
|
<SolidColorBrush Color="{Binding}" /> |
|
|
|
</Border.Background> |
|
|
|
</Border> |
|
|
|
<Panel AutomationProperties.Name="{Binding Converter={StaticResource ColorToDisplayNameConverter}}" |
|
|
|
ToolTip.Tip="{Binding Converter={StaticResource ColorToDisplayNameConverter}}" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
VerticalAlignment="Stretch"> |
|
|
|
<Border Background="{StaticResource ColorControlCheckeredBackgroundBrush}" /> |
|
|
|
<Border HorizontalAlignment="Stretch" |
|
|
|
VerticalAlignment="Stretch"> |
|
|
|
<Border.Background> |
|
|
|
<SolidColorBrush Color="{Binding}" /> |
|
|
|
</Border.Background> |
|
|
|
</Border> |
|
|
|
</Panel> |
|
|
|
</DataTemplate> |
|
|
|
</ListBox.ItemTemplate> |
|
|
|
<ListBox.ItemsPanel> |
|
|
|
|
|
|
|
@ -184,14 +184,18 @@ |
|
|
|
Margin="12"> |
|
|
|
<ListBox.ItemTemplate> |
|
|
|
<DataTemplate DataType="{x:Type Color}"> |
|
|
|
<Border AutomationProperties.Name="{Binding Converter={StaticResource ColorToDisplayNameConverter}}" |
|
|
|
ToolTip.Tip="{Binding Converter={StaticResource ColorToDisplayNameConverter}}" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
VerticalAlignment="Stretch"> |
|
|
|
<Border.Background> |
|
|
|
<SolidColorBrush Color="{Binding}" /> |
|
|
|
</Border.Background> |
|
|
|
</Border> |
|
|
|
<Panel AutomationProperties.Name="{Binding Converter={StaticResource ColorToDisplayNameConverter}}" |
|
|
|
ToolTip.Tip="{Binding Converter={StaticResource ColorToDisplayNameConverter}}" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
VerticalAlignment="Stretch"> |
|
|
|
<Border Background="{StaticResource ColorControlCheckeredBackgroundBrush}" /> |
|
|
|
<Border HorizontalAlignment="Stretch" |
|
|
|
VerticalAlignment="Stretch"> |
|
|
|
<Border.Background> |
|
|
|
<SolidColorBrush Color="{Binding}" /> |
|
|
|
</Border.Background> |
|
|
|
</Border> |
|
|
|
</Panel> |
|
|
|
</DataTemplate> |
|
|
|
</ListBox.ItemTemplate> |
|
|
|
<ListBox.ItemsPanel> |
|
|
|
|
|
|
|
@ -390,14 +390,18 @@ |
|
|
|
Margin="12"> |
|
|
|
<ListBox.ItemTemplate> |
|
|
|
<DataTemplate DataType="{x:Type Color}"> |
|
|
|
<Border AutomationProperties.Name="{Binding Converter={StaticResource ColorToDisplayNameConverter}}" |
|
|
|
ToolTip.Tip="{Binding Converter={StaticResource ColorToDisplayNameConverter}}" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
VerticalAlignment="Stretch"> |
|
|
|
<Border.Background> |
|
|
|
<SolidColorBrush Color="{Binding}" /> |
|
|
|
</Border.Background> |
|
|
|
</Border> |
|
|
|
<Panel AutomationProperties.Name="{Binding Converter={StaticResource ColorToDisplayNameConverter}}" |
|
|
|
ToolTip.Tip="{Binding Converter={StaticResource ColorToDisplayNameConverter}}" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
VerticalAlignment="Stretch"> |
|
|
|
<Border Background="{StaticResource ColorControlCheckeredBackgroundBrush}" /> |
|
|
|
<Border HorizontalAlignment="Stretch" |
|
|
|
VerticalAlignment="Stretch"> |
|
|
|
<Border.Background> |
|
|
|
<SolidColorBrush Color="{Binding}" /> |
|
|
|
</Border.Background> |
|
|
|
</Border> |
|
|
|
</Panel> |
|
|
|
</DataTemplate> |
|
|
|
</ListBox.ItemTemplate> |
|
|
|
<ListBox.ItemsPanel> |
|
|
|
|