KMultiActionButton

Florian Graessle holehan at kde.org
Wed Dec 6 23:34:33 GMT 2006


Aaron J. Seigo wrote On 05.12.2006 22:59 Uhr:
> hi all...
> 
> attached is a draft API for a widget that groups multiple actions into one 
> area on a toolbar. screenshot can be seen here:
> 
>  http://bddf.ca/~aseigo/actionbutton.png
> 
> it looks like crap right now, i know, but i'm more interested in the API. to 
> this point i've modelled it after QToolBar's API. the idea is that you create 
> one of these buttons, add actions to it and then call QToolBar::addWidget( 
> multiActionButton ).
> 
> thoughts? (and yes, i know there isn't any API docu there yet)

In Okular I had the same idea to group the different tool modes. There
we have four different tool modes that all have a separate toolbar icon.
As of now each tool has its own label:

 *Browse Tool
 *Zoom Tool
 *Select Tool
 *Text Selection Tool (because of space issues you actually won't find
this one in the current okular toolbar)

With the most recent KDE4 default of showing "text under icons" this is
leading to a toolbar that is far too wide. Prior to removing the tools
from the toolbar or choosing a different representation I thought of the
following for Okular:

 1. Group the tools visually - just like you proposed above
 2. Give the group of actions one common label, e.g. "Tools" or "Tool
Mode" (like Apple's Preview does. See [1]). This would shrink the
toolbar size to a usable level and still make use of the "text under
icons" setting.
 3. Use tooltips to show the label of each tool action, show what each
tool does.

So in addition to what you described above we'd need a way to set one
label for the whole action group.

Florian

[1] http://www.uni-koblenz.de/~soma/bldr/preview_tools.png




More information about the kde-core-devel mailing list