Support in KToggleAction for toggling the text itself

David Faure faure at kde.org
Fri Feb 6 17:05:37 GMT 2004


The problem:
--------------
Toggle actions plugged into menus currently toggle a checkmark in front of the menu item.
This is typically used with a text that represents a state (e.g. "View/Frame Borders").

But this is usually ambiguous (if I see "Case Insensitive Sort" in a menu, does that
mean it's currently sorting that way or that one should click on it to sort that way?).

Better is to use verbs, to describe actions. We do so already for e.g. "Show menubar".
However this is even worse currently: when the menubar is shown, the menuitem
still says "show menubar", which is a really wrong text for a menuitem hiding it.

The solution:
--------------
The attached patch adds support for (optionally) toggling the text instead of 
using a checkmark for toggleactions in menuitems, and uses this support for
the show/hide menubar and toolbar actions.

I hesitated to subclass KToggleAction for it, but that means copying thousands
(almost) of constructors :). So I preferred to add a setting to KToggleAction.

OK to commit?

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: switchingtext.diff
Type: text/x-diff
Size: 6504 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040206/a5b31dac/attachment.diff>
-------------- next part --------------
_______________________________________________
kde-usability mailing list
kde-usability at kde.org
https://mail.kde.org/mailman/listinfo/kde-usability


More information about the kde-core-devel mailing list