~ft/picker

a6de205ab4f439041b54d3fcb76092efbe0bb50d — Sigrid Haflínudóttir 3 months ago d14fafd
apply current colorspace when switching current color
1 files changed, 4 insertions(+), 2 deletions(-)

M picker.c
M picker.c => picker.c +4 -2
@@ 601,8 601,10 @@ changed:
				for (c = colors; c != nil; c = c->next) {
					if (ptinrect(m.xy, c->r)) {
						color = c;
						redraw();
						goto next;
						space->fromrgb(c->rgba, c->v);
						for (i = 0; i < 3; i++)
							c->v[i] = MAX(0.0, MIN(space->max[i], c->v[i]));
						goto changed;
					}
				}
			} else if (m.buttons == 4 && (i = menuhit(3, mctl, &menu2, nil)) >= 0) {