[kde-guidelines] Possible guidelines for buttons with menus

David Edmundson david at davidedmundson.co.uk
Fri Aug 2 14:30:52 UTC 2013


On Fri, Aug 2, 2013 at 3:08 PM, Aurélien Gâteau <agateau at kde.org> wrote:

> Hi,
>
> As you may know, I am contributing to the KDE Frameworks project, which
> aims
> at splitting the existing Qt4-based kdelibs into separate, finer-grained,
> Qt5-
> based components. Another objective of this project is to get some of the
> features KDE developers added to Qt widgets back into Qt itself.
>
> One of those features was "delayed menus" for buttons. When used on a
> button,
> then a short click on the button triggers a default action, while holding
> the
> mouse pressed on the button shows a menu with more actions. Qt provides
> this
> feature for toolbar buttons but not for regular buttons (QPushButton).
>
> in kdelibs, KPushButton extends QPushButton and add this delayed menu
> feature,
> so the original task was to implement the same in QPushButton, so that we
> could get rid of KPushButton. After a bit of research, we found out this
> feature was very seldom used and we felt it was surprising: buttons with
> delayed menus look like menu-buttons (buttons where a short click always
> show
> a menu) but behave differently.
>
> Here is an example of such a button: Kate session dialog. To get this
> dialog
> to show, open the config dialog, go to  Application > Sessions, and select
> the "Manually choose a session" radio button. Now restart Kate, the dialog
> should appear. It looks like this:
>
> http://6g6.eu/sih0-kate-session-dialog-1.png
>
> Clicking the "New Session" button creates a new session. When you hold down
> the mouse button on it, you get this menu:
>
> http://6g6.eu/sih0-kate-session-dialog-2.png
>
> The KDE Frameworks project maintains a porting document which suggest
> developers alternatives for features which are going away. What should we
> suggest to developers using this feature? A generic solution would be
> recommending the use of a plain menu button, but I am not sure if it is
> always
> practical since it means the default action will require two clicks
> instead of
> one.
>
>
I like the usage of "split button dropdowns" as seen here
http://getbootstrap.com/components/. It's quite clear, click on the left
you get the button, click on the right you'd get the menu.

On a technical level it'd be harder to get that into Qt, but it's something
we could make that could go into KWidgetAddons just fine.

Dave


>
> Aurélien
> _______________________________________________
> kde-guidelines mailing list
> kde-guidelines at kde.org
> https://mail.kde.org/mailman/listinfo/kde-guidelines
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-guidelines/attachments/20130802/d9881b9e/attachment.html>


More information about the kde-guidelines mailing list