mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-25 19:06:34 +08:00
Refactor ColorPicker components and improve UI consistency (#795)
* feat: add converters and update bindings in ColorPicker components. * feat: simplify ColorPicker layout by replacing complex structure with ColorView component. * feat: remove CornerRadiusToDoubleConverter. * feat: replace EnumToBoolConverter & ToColorModel with ObjectConverters.Equal. * feat: set HexInputAlphaPosition to Trailing. * feat: update ColorView layout and styling for improved UI consistency. * feat: bind Increment property of ColorSliders to respective TickFrequency and Slider values. * feat: update ColorView bindings to use new syntax and adjust CornerRadius for improved styling. * feat: update ColorPicker SelectedIndex Mode to TwoWay. * feat: sync upstream changes. * feat: update ColorPicker and ColorView to use SemiColorPalette for improved color selection. * feat: update ControlTemplate TargetType. * feat: add AIPurple colors to Palette. * refactor: display real Hex in HexColorPicker. * fix: update ColorView bindings to handle null values with a converter. * refactor: refactor ColorPicker demo. * refactor: replace RelativeSource bindings with TemplateBinding in ColorView. * chore: copy ColorView Template to ColorPicker. * fix: update AlphaEnabled ToggleSwitch content to reflect correct label. * fix: fix index order in ColorPicker.
This commit is contained in:
17
src/Semi.Avalonia.ColorPicker/Controls/Converters.axaml
Normal file
17
src/Semi.Avalonia.ColorPicker/Controls/Converters.axaml
Normal file
@@ -0,0 +1,17 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="using:Avalonia.Controls.Converters"
|
||||
xmlns:pc="using:Avalonia.Controls.Primitives.Converters"
|
||||
xmlns:globalization="using:System.Globalization">
|
||||
<pc:ContrastBrushConverter x:Key="ContrastBrushConverter" />
|
||||
<pc:AccentColorConverter x:Key="AccentColorConverter" />
|
||||
|
||||
<converters:ColorToDisplayNameConverter x:Key="ColorToDisplayNameConverter" />
|
||||
<converters:DoNothingForNullConverter x:Key="DoNothingForNullConverter" />
|
||||
<converters:ToBrushConverter x:Key="ToBrushConverter" />
|
||||
<converters:ColorToHexConverter x:Key="ColorToHexConverter" AlphaPosition="Trailing" IsAlphaVisible="True" />
|
||||
|
||||
<converters:EnumToBoolConverter x:Key="EnumToBoolConverter" />
|
||||
|
||||
<globalization:NumberFormatInfo x:Key="ColorViewComponentNumberFormat" NumberDecimalDigits="0" />
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user