diff options
Diffstat (limited to 'src/GraphicObjects/ColorPicker.cs')
| -rw-r--r-- | src/GraphicObjects/ColorPicker.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/GraphicObjects/ColorPicker.cs b/src/GraphicObjects/ColorPicker.cs index ee0d31da..cc955191 100644 --- a/src/GraphicObjects/ColorPicker.cs +++ b/src/GraphicObjects/ColorPicker.cs @@ -165,11 +165,12 @@ namespace Crow NotifyValueChanged ("SelectedColorName", n); else NotifyValueChanged ("SelectedColorName", "-"); - NotifyValueChanged ("HexColor", - ((int)Math.Round(R)).ToString ("X2") + - ((int)Math.Round(G)).ToString ("X2") + - ((int)Math.Round(B)).ToString ("X2") + - ((int)Math.Round(A)).ToString ("X2")); + string tmp = ((int)Math.Round (R)).ToString ("X2") + + ((int)Math.Round (G)).ToString ("X2") + + ((int)Math.Round (B)).ToString ("X2"); + if (curColor.A < 1.0) + tmp += ((int)Math.Round (A)).ToString ("X2"); + NotifyValueChanged ("HexColor", tmp); } void notifyRGBAHasChanged(){ NotifyValueChanged ("R", R); |