KDE Visual Design Group/KirigamiHIG/CommandPatterns/Dialogs

From KDE Community Wiki
Revision as of 17:34, 5 July 2016 by Colomar (talk | contribs) (Added implementation for bottom drawer)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Dialogs

When to use

  • Use a Bottom Drawer to present actions for a quick choice, for example a yes/no question or several different variants of executing an action
  • Use a Dialog Sheet to present information or actions without leaving the current context (e.g. for editing properties of an object in the current context, opening a file etc.)

How to use

Be aware that both Dialog Sheet and Bottom Drawer can be closed simply by swiping, make sure that this does not leave your application in an undefined state.

Bottom Drawer

Make sure that your actions fit into the drawer and are not overlapped by Action Buttons.

Dialog Sheet

Consider using the Primary Action Button to execute the main action within the dialog (e.g. saving edits made in the dialog or to close the dialog if there is no main action but an action button exists on that page anyway).

Implementation

For the Dialog Sheet, use org::kde::kirigami::OverlaySheet

For the Bottom Drawer, use org::kde::kirigami::OverlayDrawer and set the "edge" property to Qt.BottomEdge