colorsel keynav


Adding mnemonics to the colorsel dialog, I got a bit carried away and
worked on keynav for the color triangle and dialog in general.

For the triangle, I made the outer ring and the inner triangle
separately focusable. You can tab between them. Arrow keys are used to
move around the ring or inside the triangle.

Outstanding problems with the colorsel keynav:

 - the triangle is ugly now, because I'm using the black border
   for focus indication, which means no black border by default;
   suggested fixes are either a) use gray border by default, darken
   to black for focus or b) always use a neutral gray background, 
   regardless of theme, so you can see the colors, and then there
   are fewer contrast worries

 - I'm having to do tabbing between the ring and triangle with 
   lame hacks since GtkHSV is not a container. The hacks work
   except that I can't tell on focus_in whether the user
   got here with Tab or Shift-Tab, so can't choose between 
   ring and tab to be focused initially. Only solution 
   I can think of is to derive GtkHSV from GtkContainer and 
   use gtk_container_focus instead of my lame hacks.
   This is also really needed since Tab/Shift-Tab should
   be binding-set-ized in GtkWindow, at which point
   hardcoding them in HSV would be wrong.

 - the palette is not key navigable. Also, it draws the "active"
   palette cell as if it were focused, so if it was key navigable, it
   would be confusing.  Suggestion is that we draw the active cell
   some other way. No real ideas though.

 - the eyedropper button can't have a mnemonic since it has no text. 
   You can tab to it of course, so not a big deal.

 - there's some bug in mnemonics exposed by the colorsel, 
   will be visible once I commit, if you do Alt+G to 
   jump to green, then try Alt+B to go to blue, it doesn't work.
   But Alt+B initially works.

Will probably commit what I have in the morning along with the event
return val stuff, and then hack on fixing these problems up.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]