D11663: Add InlineMessage type and Gallery app example page
Kai Uwe Broulik
noreply at phabricator.kde.org
Mon Mar 26 07:31:56 UTC 2018
broulik added a comment.
Sweet
INLINE COMMENTS
> InlineMessage.qml:364
> +
> + visible: actionsLayout.overflowSet.findIndex(function(act) {
> + return act == modelData}) > -1 && modelData.visible
`findIndex` is new in Qt 5.9
[1] https://doc.qt.io/qt-5/qtqml-javascript-functionlist.html
> InlineMessage.qml:387
> + Component.onCompleted: {
> + contentItem.opacity = visible ? 1.0 : 0.0;
> + complete = true;
Note that `visible` propagates recursively so when the component containing a default-visible message widget isn't shown this will still animate. But then I don't know if that's a thing and how to fix that..
> InlineMessage.qml:100
> + */
> + property string icon
> +
Should this be a `var` property so you could also pass a `QIcon` or "QtQuick Controls Icon"?
> InlineMessage.qml:113
> + */
> + property bool showCloseButton: false
> +
`KMessageWidget` names it `closeButtonVisible`
> InlineMessage.qml:127
> + */
> + readonly property bool animating: "animating" in contentItem && contentItem.animating
> +}
`contentItem.hasOwnProperty("animating")`
> enums.h:39
>
> +class InlineMessageType : public QObject
> +{
With Qt 5.8 this could become
namespace InlineMessageType
{
Q_NAMESPACE
enum Type {
...
with `qmlRegisterUncreatableMetaObject`
(purely informational comment)
> enums.h:42
> + Q_OBJECT
> + Q_ENUMS(Type)
> +
`Q_ENUM`
(also informational, the code around it does the same, could be cleaned up eventually)
REPOSITORY
R169 Kirigami
REVISION DETAIL
https://phabricator.kde.org/D11663
To: hein, #kirigami, mart
Cc: broulik, ngraham, plasma-devel, apol, davidedmundson, mart, hein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180326/df1e32aa/attachment-0001.html>
More information about the Plasma-devel
mailing list