wjakob / nanogui

Minimalistic GUI library for OpenGL
Other
4.66k stars 608 forks source link

Very difficult to choose exactly white color #12

Closed alecjacobson closed 9 years ago

alecjacobson commented 9 years ago

The color picker is a cool UI. I find that it's difficult to choose exact colors at the corner of the triangle. If I click in the triangle, mouse dragging only changes the selection if the mouse cursor stays inside the triangle. Therefore I can't just drag in the extreme direction to pull the selection to the far corner of the triangle (e.g. to select exactly white). nanovg-color-picker-fitts-law So, perhaps this is a feature request to capture the mouse dragging on the color picker triangle even if the cursor strays outside the triangle, and then map the cursor point to the closest point on the triangle for selection.

(accidentally posted originally to nanovg https://github.com/memononen/nanovg/issues/243)

wjakob commented 9 years ago

Hi Alec,

the color picker was contributed by @mrzv (https://github.com/wjakob/nanogui/pull/5). It's not used in any of my projects and I probably won't have any free cycles in the near future to implement the improvement you suggest.

I do, however, accept patches / pull requests :)

Thanks, Wenzel

mrzv commented 9 years ago

That's a nice idea. Not sure when I can get to it (i.e., @alecjacobson, you might be better off just submitting a patch yourself), but I agree it would be useful to have.

wjakob commented 9 years ago

I ended up adding it myself in the end.. (very easy fix)