D11663: Add InlineMessage type and Gallery app example page
Eike Hein
noreply at phabricator.kde.org
Sat Mar 24 21:33:58 UTC 2018
hein created this revision.
hein added reviewers: Kirigami, mart.
Restricted Application added a project: Kirigami.
Restricted Application added a subscriber: plasma-devel.
hein requested review of this revision.
REVISION SUMMARY
InlineMessage can be used to show various messages to the user,
without requiring the use of a dialog.
InlineMessage is analogous to KWidgetAddons' KMessageWidget and
provides nearly the same API:
- Message type: Information (default), Positive, Warning or Error
- Message text
- Icon (optional)
- Closable (optional, shows close button)
- Actions list (shown as buttons)
- Signals for link hover and link activation
- Animation state
It does not implement the 'wordWrap' property of KMessageWidget.
Instead, wrapping the message text is always wrapped.
Further, unlike in KMessageWidget, actions buttons are added from
left to right, not from right to left.
Additionally, it improves over KMessageWidget in two ways:
- If no icon is manually set, it shows an appropriate icon for the message type by default.
- Overflow handling for many messages (à la the Card component).
All properties are declared abstractly in the template and all
visuals are implemented in the control, so that the style can
optionally override the appearance fully.
This patch also adds an example page to the Gallery app which
illustrates the various message types and features in an
interactive manner.
Random notes:
- I would have preferred to make the template API completely abstract and had 'showCloseButton' as 'closable' originally but then changed it for consistency with the property in OverlaySheet.
REPOSITORY
R169 Kirigami
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D11663
AFFECTED FILES
examples/galleryapp/CMakeLists.txt
examples/galleryapp/resources.qrc
examples/gallerydata/contents/ui/MainPage.qml
examples/gallerydata/contents/ui/gallery/InlineMessagesGallery.qml
kirigami.qrc
src/controls/InlineMessage.qml
src/controls/plugins.qmltypes
src/controls/templates/InlineMessage.qml
src/enums.h
src/kirigamiplugin.cpp
src/qmldir
To: hein, #kirigami, mart
Cc: plasma-devel, apol, davidedmundson, mart, hein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180324/e491bcd1/attachment.html>
More information about the Plasma-devel
mailing list