Spade-Editor / Spade

Cross-platform raster graphics editor inspired by Paint.NET
GNU General Public License v3.0
41 stars 10 forks source link

HSB colour picker glitches on monochrome colours #48

Closed HeroesGrave closed 10 years ago

HeroesGrave commented 10 years ago

To reproduce:

or

The hue gets reset to red.

The state of the hue should stay the same while the saturation/brightness sliders are at 0.

Longor1996 commented 10 years ago

The color-picker would have to store colors in HSB-A instead of RGB-A to do that. To be frankly, this can be completely ignored until a actual User of Paint.JAVA comes and says it needs to be fixed.

HeroesGrave commented 10 years ago

I think I might be able to do something...

HeroesGrave commented 10 years ago

What needs to be done is to store previous HSB values in a place that can be easily accessed, and then only change certain values when certain actions have been performed. (ie: Don't change the hue if the brightness/saturation slider was changed, but do change it for anything else)

I'll come back to this after 1.0

BurntPizza commented 10 years ago

Fixed, although probably not in the most elegant manner. I had each UI component set a static variable to a flag, and made the RGBtoHSB function not reset hue or saturation or both depending on what UI component was updating. I'll eventually refactor that whole class, it's a mess.

@HeroesGrave I'm done on the ColorChooser for a while now though, so you can merge it.

BurntPizza commented 10 years ago

@HeroesGrave Requesting close of this issue; see ef2121a above.

HeroesGrave commented 10 years ago

Oh, yes. Forgot about this.