Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
435adc6
gradients wip
flabbet Mar 3, 2025
352299f
Basic gradient bar works
flabbet Mar 3, 2025
1cb2443
Exposed gradient related properties
flabbet Mar 4, 2025
32ae730
mvp wip
flabbet Mar 4, 2025
939bc43
Removed some binding errors
flabbet Mar 5, 2025
93d8bce
Fixed bindings
flabbet Mar 7, 2025
7a7c56b
Improved state preservation
flabbet Mar 7, 2025
65e9ec4
Made LinearGradientPointPad work
flabbet Mar 10, 2025
d4df47c
radial pad wip
flabbet Mar 10, 2025
6eb7d26
Added RadialGradientPad
flabbet Mar 11, 2025
b9a7f56
Added ConicGradientPad and inputs
flabbet Mar 11, 2025
e733a86
Increased cp height
flabbet Mar 11, 2025
ed24453
Fixed offset not updating properly
flabbet Mar 11, 2025
5df1036
Merge branch 'master' into gradients
flabbet Mar 12, 2025
596963f
Update ColorPicker.AvaloniaUI.csproj
flabbet Mar 12, 2025
8d2e58d
Added Recent brushes
flabbet Mar 12, 2025
1503a4a
Fixed notifyable gradient not updating
flabbet Mar 12, 2025
ddcea86
Some visual improvements
flabbet Mar 12, 2025
335385e
Added clamping to gradient bar
flabbet Mar 12, 2025
79a7ded
removed ios and android
flabbet Mar 12, 2025
2287f7c
Fixed muting recent gradients
flabbet Mar 13, 2025
172589c
Removed bg
flabbet Mar 30, 2025
fbb4c0a
update avalonia version
flabbet Apr 4, 2025
74c4547
Fixed not updating hex picker
flabbet Apr 4, 2025
ef170d8
updated avalonia version
flabbet Apr 4, 2025
4db4bac
Updated avalonia version
flabbet Apr 17, 2025
14fd539
Update Directory.Build.props
flabbet Apr 17, 2025
78237e9
Updated avalonia to 11.3.0
flabbet May 2, 2025
c6a57b7
Fixed absolute values and transform passing
flabbet Jun 12, 2025
db1d4c6
Fixed losing color values
flabbet Jun 12, 2025
66bae8c
Removed other .net versions from support
flabbet Jun 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
<Label>Portable Color Picker</Label>
<colorPicker:PortableColorPicker Width="40" Height="20"
ColorState="{Binding #maindisplay.ColorState, Mode=TwoWay}"
GradientState="{Binding #standard_picker.GradientState, Mode=TwoWay}"
SecondColorState="{Binding #maindisplay.SecondColorState, Mode=TwoWay}" />
<TextBlock TextWrapping="Wrap" Margin="5">Portable Color Picker, alpha hidden, transparent hint color, hsv/hsl fractional part hidden</TextBlock>
<Grid Width="40" Height="40">
<colorPicker:PortableColorPicker SmallChange="5"
UseHintColor="True" HintColor="Transparent"
GradientState="{Binding #standard_picker.GradientState, Mode=TwoWay}"
ColorState="{Binding #maindisplay.ColorState, Mode=TwoWay}"
SecondColorState="{Binding #maindisplay.SecondColorState, Mode=TwoWay}"
ShowFractionalPart="False"
Expand All @@ -47,6 +49,7 @@
</TextBlock>
</Label>
<colorPicker:StandardColorPicker Width="200" Height="380" x:Name="portable_picker"
GradientState="{Binding #standard_picker.GradientState, Mode=TwoWay}"
SmallChange="5" ShowAlpha="True" HexRepresentation="ARGB"
ColorState="{Binding #maindisplay.ColorState, Mode=TwoWay}"
SecondColorState="{Binding #maindisplay.SecondColorState, Mode=TwoWay}" />
Expand All @@ -64,7 +67,7 @@

<Label Grid.Row="2" Grid.Column="1">Color Picker</Label>
<ComboBox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left"
SelectedIndex="{Binding #square_picker.PickerType}"
SelectedIndex="{Binding #square_picker.PickerType}"
Theme="{DynamicResource ColorPickerComboBox}"
VerticalAlignment="Top" Margin="5,25,5,5" x:Name="combobox">
<ComboBoxItem>HSV</ComboBoxItem>
Expand All @@ -76,7 +79,7 @@
<Label Grid.Row="3" Grid.Column="1">Color as hex, formatted as either RGBA or ARGB</Label>
<StackPanel Orientation="Horizontal" Margin="5, 14, 5, 5" Grid.Row="3" Grid.Column="1">
<ComboBox DockPanel.Dock="Left" Margin="0, 0, 5, 0"
SelectedIndex="{Binding #hextextbox.HexRepresentation}"
SelectedIndex="{Binding #hextextbox.HexRepresentation}"
Theme="{DynamicResource ColorPickerComboBox}"
VerticalAlignment="Center" x:Name="hexcombobox">
<ComboBoxItem>RGBA</ComboBoxItem>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Nullable>enable</Nullable>
<AvaloniaVersion>11.2.5</AvaloniaVersion>
<AvaloniaVersion>11.3.0</AvaloniaVersion>
</PropertyGroup>
</Project>
Empty file added ColorPickerDemo/stylecop.json
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@ namespace ColorPicker.Behaviors;

internal class HexTextBoxBindingBehavior : LostFocusUpdateBindingBehavior
{
public static readonly StyledProperty<Color> ColorProperty = AvaloniaProperty.Register<HexTextBoxBindingBehavior, Color>(
"Color");
public static readonly StyledProperty<Color> ColorProperty =
AvaloniaProperty.Register<HexTextBoxBindingBehavior, Color>(
"Color");

public Color Color
{
get => GetValue(ColorProperty);
set => SetValue(ColorProperty, value);
}

public static readonly StyledProperty<ColorToHexConverter> HexConverterProperty = AvaloniaProperty.Register<HexTextBoxBindingBehavior, ColorToHexConverter>(
"HexConverter");
public static readonly StyledProperty<ColorToHexConverter> HexConverterProperty =
AvaloniaProperty.Register<HexTextBoxBindingBehavior, ColorToHexConverter>(
"HexConverter");

public ColorToHexConverter HexConverter
{
Expand All @@ -36,4 +38,4 @@ protected override void OnSubmitValue(string oldValue, string newValue)

Color = color;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public string Text
protected override void OnAttached()
{
AssociatedObject.LostFocus += OnLostFocus;
OnBindingValueChanged();
base.OnAttached();
}

Expand All @@ -49,7 +50,7 @@ private void OnLostFocus(object sender, RoutedEventArgs e)
}
}

private void OnBindingValueChanged()
protected void OnBindingValueChanged()
{
if (AssociatedObject != null)
{
Expand All @@ -61,4 +62,4 @@ protected virtual void OnSubmitValue(string oldValue, string newValue)
{

}
}
}
Loading