Comment 6 for bug 635803

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

This is not a bug in the session menu. It is a bug in GTK, or more precisely, a lack of sophistication in the way GTK lays out menus.

It is bad for the horizontal area used to display keyboard combos to overlap a lot with the horizontal area used for the item text, because this makes it harder to scan both the items and the combos. You can see this for example in OpenOffice.org Writer's "Insert" menu (screenshot attached): it's difficult to see that the "Comment" item has a keyboard combo, because it's smothered by the longer "Cross-reference..." item immediately above it.

Native GTK menus go to an extreme length to make sure this never happens: all menu item labels, and all keyboard combos in that menu, occupy completely separate columns, with space between the columns. Unfortunately, this makes some menus very wide. The session menu is just one example of this. For an even worse example, see Evolution's "Search" menu: the "Clear" item label is miles away from its Shift+Ctrl+B keyboard combo, because the combo is trying to keep clear of the much longer "Create Search Folder From Search..." item further down the menu. <http://lwn.net/images/ns/mua/evolution/searching.png> And that really isn't necessary.

Native Windows and Mac OS X menus take a more sophisticated approach. I'm not sure exactly what they do, but they seem to allow a *small* amount of overlap between text and combos in adjacent items
<http://www.betalogue.com/2004/02/25/non-breaking-space-keyboard-shortcut-in-indesign-cs/>
<http://sierramousetrap.org/smmug/20100405-meeting/demo_discussion/shortcuts/menuShortcuts.png>
and a much greater overlap between text and combos in non-adjacent items.
<http://0.tqn.com/d/graphicssoft/1/0/c/C/1/psc5-016.gif>
<http://etutorials.org/shared/images/tutorials/tutorial_42/54084xfg0107.jpg>
<http://i.i.com.com/cnwk.1d/i/tim//2010/08/18/KeyboardShortcuts3.png?>
I think GTK should do the same.