Skip to content
Snippets Groups Projects
Commit 175f6672 authored by Stuart Levy's avatar Stuart Levy
Browse files

Make Alt+Shift = right-button(brightness, or blue). Shift-without-Alt = edit alpha.

parent 0635ba61
No related branches found
No related tags found
No related merge requests found
......@@ -399,17 +399,19 @@ int CMedit::handle(int ev) {
dragfrom = x, dragval = y, dragamount = 0;
draghue = ( (x - XMIN) * (x - (XMIN/4)) < 0 ); /* If dragging on hue strip */
if(Fl::event_state(FL_SHIFT)) {
if(Fl::event_state(FL_ALT | FL_SHIFT) == FL_SHIFT) { /* Shift but not Alt: edit alpha */
dragfield = ALPHA;
} else {
// Which button? Take account of alt/meta modifiers too.
int btn = 1;
if(Fl::event_state(FL_BUTTON2 | FL_ALT))
btn = 2;
else if(Fl::event_state(FL_BUTTON3 | FL_META))
if(Fl::event_state(FL_ALT | FL_SHIFT) == (FL_ALT | FL_SHIFT)) /* Shift Alt: edit Right */
btn = 3;
else if(Fl::event_state(FL_BUTTON3 | FL_META)) /* rightbutton or Meta: edit Right */
btn = 3;
else if(Fl::event_state(FL_BUTTON2 | FL_ALT)) /* middlebutton or Alt (but not Shift Alt): edit Middle */
btn = 2;
static CMfield btn2field[2][3] = {
{ RED, GREEN, BLUE },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment