From 548d6fc956061cd1edb177447cdf07104d92b9c7 Mon Sep 17 00:00:00 2001 From: Sebastian Kügler Date: Wed, 6 Jan 2016 04:40:33 +0100 Subject: sync with mobilecomponents a85365111 + patches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- qt-mobile/qml/mobilecomponents/private/ActionButton.qml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'qt-mobile/qml/mobilecomponents/private/ActionButton.qml') diff --git a/qt-mobile/qml/mobilecomponents/private/ActionButton.qml b/qt-mobile/qml/mobilecomponents/private/ActionButton.qml index 9ad55ff7c..80f037e48 100644 --- a/qt-mobile/qml/mobilecomponents/private/ActionButton.qml +++ b/qt-mobile/qml/mobilecomponents/private/ActionButton.qml @@ -27,6 +27,8 @@ MouseArea { property alias iconSource: icon.source property bool checkable: false property bool checked: false + //either Action or QAction should work here + property QtObject action Layout.minimumWidth: Units.iconSizes.large Layout.maximumWidth: Layout.minimumWidth implicitWidth: Units.iconSizes.large @@ -34,8 +36,8 @@ MouseArea { drag { target: button axis: Drag.XAxis - minimumX: contextDrawer ? 0 : parent.width/2 - width/2 - maximumX: globalDrawer ? parent.width : parent.width/2 - width/2 + minimumX: parent.width/2 - width/2 - (contextDrawer && contextDrawer.enabled ? contextDrawer.contentItem.width : 0) + maximumX: parent.width/2 - width/2 + (globalDrawer && globalDrawer.enabled ? globalDrawer.contentItem.width : 0) } function toggleVisibility() { showAnimation.running = false; @@ -74,6 +76,11 @@ MouseArea { if (checkable) { checked = !checked; } + + //if an action has been assigned, trigger it + if (button.action && button.action.trigger) { + button.action.trigger(); + } } Connections { target: globalDrawer -- cgit v1.2.3-70-g09d2