Fix transparency in color pickers again
This commit is contained in:
parent
2fe433991d
commit
669c638fad
@ -64,7 +64,7 @@ func (this *HSVAColorPicker) SetValue (value color.Color) {
|
|||||||
if value == nil { value = color.Transparent }
|
if value == nil { value = color.Transparent }
|
||||||
this.value = internal.HSVAModel.Convert(value).(internal.HSVA)
|
this.value = internal.HSVAModel.Convert(value).(internal.HSVA)
|
||||||
this.hueSlider.SetValue(this.value.H)
|
this.hueSlider.SetValue(this.value.H)
|
||||||
this.alphaSlider.SetValue(float64(this.value.A) / 255)
|
this.alphaSlider.SetValue(float64(this.value.A) / 0xFFFF)
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnValueChange specifies a function to be called when the user changes the
|
// OnValueChange specifies a function to be called when the user changes the
|
||||||
|
@ -91,7 +91,7 @@ func (this *Swatch) Choose () {
|
|||||||
|
|
||||||
committed := false
|
committed := false
|
||||||
|
|
||||||
colorPicker := NewColorPicker(this.Value())
|
colorPicker := NewHSVAColorPicker(this.Value())
|
||||||
colorPicker.OnValueChange(func () {
|
colorPicker.OnValueChange(func () {
|
||||||
this.userSetValue(colorPicker.Value())
|
this.userSetValue(colorPicker.Value())
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user