diff options
author | Sebastian Kügler <sebas@kde.org> | 2016-01-06 04:40:33 +0100 |
---|---|---|
committer | Sebastian Kügler <sebas@kde.org> | 2016-01-06 04:41:41 +0100 |
commit | 548d6fc956061cd1edb177447cdf07104d92b9c7 (patch) | |
tree | e8263e890f0a3294cc5b013fa4e5b61ab46ab037 /qt-mobile/qml/mobilecomponents/ContextDrawer.qml | |
parent | 8664925e20f4f4b700ace48765477a9ca3fb36dd (diff) | |
download | subsurface-548d6fc956061cd1edb177447cdf07104d92b9c7.tar.gz |
sync with mobilecomponents a85365111 + patches
This is the latest state of the upstream art from Plasma, plus our
patches to disable the gamma effect on the icon, and the drawer removed.
Signed-off-by: Sebastian Kügler <sebas@kde.org>
Diffstat (limited to 'qt-mobile/qml/mobilecomponents/ContextDrawer.qml')
-rw-r--r-- | qt-mobile/qml/mobilecomponents/ContextDrawer.qml | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/qt-mobile/qml/mobilecomponents/ContextDrawer.qml b/qt-mobile/qml/mobilecomponents/ContextDrawer.qml index aea4a5ca5..575ac3679 100644 --- a/qt-mobile/qml/mobilecomponents/ContextDrawer.qml +++ b/qt-mobile/qml/mobilecomponents/ContextDrawer.qml @@ -25,14 +25,15 @@ import org.kde.plasma.mobilecomponents 0.2 OverlayDrawer { id: root - property string title + property string title: typeof i18n !== "undefined" ? i18n("Actions") : "Actions" //This can be any type of object that a ListView can accept as model. It expects items compatible with either QAction or QQC Action - property var actions + property var actions: pageStack.lastVisiblePage ? pageStack.lastVisiblePage.contextualActions : null enabled: menu.count > 0 edge: Qt.RightEdge contentItem: QtControls.ScrollView { + implicitWidth: Units.gridUnit * 20 ListView { id: menu interactive: contentHeight > height @@ -49,9 +50,8 @@ OverlayDrawer { root.actions[0]; } } - verticalLayoutDirection: ListView.BottomToTop - //in bottomtotop all is flipped - footer: Item { + topMargin: menu.height - menu.contentHeight + header: Item { height: heading.height width: menu.width Heading { @@ -66,23 +66,11 @@ OverlayDrawer { text: root.title } } - delegate: ListItem { + delegate: BasicListItem { enabled: true - RowLayout { - height: implicitHeight + Units.smallSpacing * 2 - anchors { - left: parent.left - margins: Units.largeSpacing - } - Icon { - height: parent.height - width: height - source: modelData.iconName - } - Label { - text: model ? model.text : modelData.text - } - } + checked: modelData.checked + icon: modelData.iconName + label: model ? model.text : modelData.text onClicked: { if (modelData && modelData.trigger !== undefined) { modelData.trigger(); @@ -92,6 +80,7 @@ OverlayDrawer { } else { console.warning("Don't know how to trigger the action") } + root.opened = false; } } } |