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>
This commit is contained in:
Sebastian Kügler 2016-01-06 04:40:33 +01:00
parent 8664925e20
commit 548d6fc956
11 changed files with 553 additions and 904 deletions

View file

@ -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