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

@ -47,9 +47,22 @@ ApplicationWindow {
*/ */
property alias pageStack: __pageStack property alias pageStack: __pageStack
function showPassiveNotification(message, timeout, actionText, callBack) {
if (!__actionButton.__passiveNotification) {
var component = Qt.createComponent("private/PassiveNotification.qml");
__actionButton.__passiveNotification = component.createObject(contentItem.parent);
}
__actionButton.__passiveNotification.showNotification(message, timeout, actionText, callBack);
}
PageRow { PageRow {
id: __pageStack id: __pageStack
anchors.fill: parent anchors {
fill: parent
bottomMargin: Qt.inputMethod.visible ? (root.y + root.height) - (Qt.
inputMethod.keyboardRectangle.y) : 0
}
focus: true focus: true
Keys.onReleased: { Keys.onReleased: {
if (event.key == Qt.Key_Back && stackView.depth > 1) { if (event.key == Qt.Key_Back && stackView.depth > 1) {
@ -76,6 +89,8 @@ ApplicationWindow {
property alias actionButton: __actionButton property alias actionButton: __actionButton
ActionButton { ActionButton {
id: __actionButton id: __actionButton
//put it there just to make it not accessible bu users
property Item __passiveNotification
z: 9999 z: 9999
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
x: parent.width/2 - width/2 x: parent.width/2 - width/2

View file

@ -25,14 +25,15 @@ import org.kde.plasma.mobilecomponents 0.2
OverlayDrawer { OverlayDrawer {
id: root 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 //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 enabled: menu.count > 0
edge: Qt.RightEdge edge: Qt.RightEdge
contentItem: QtControls.ScrollView { contentItem: QtControls.ScrollView {
implicitWidth: Units.gridUnit * 20
ListView { ListView {
id: menu id: menu
interactive: contentHeight > height interactive: contentHeight > height
@ -49,9 +50,8 @@ OverlayDrawer {
root.actions[0]; root.actions[0];
} }
} }
verticalLayoutDirection: ListView.BottomToTop topMargin: menu.height - menu.contentHeight
//in bottomtotop all is flipped header: Item {
footer: Item {
height: heading.height height: heading.height
width: menu.width width: menu.width
Heading { Heading {
@ -66,23 +66,11 @@ OverlayDrawer {
text: root.title text: root.title
} }
} }
delegate: ListItem { delegate: BasicListItem {
enabled: true enabled: true
RowLayout { checked: modelData.checked
height: implicitHeight + Units.smallSpacing * 2 icon: modelData.iconName
anchors { label: model ? model.text : modelData.text
left: parent.left
margins: Units.largeSpacing
}
Icon {
height: parent.height
width: height
source: modelData.iconName
}
Label {
text: model ? model.text : modelData.text
}
}
onClicked: { onClicked: {
if (modelData && modelData.trigger !== undefined) { if (modelData && modelData.trigger !== undefined) {
modelData.trigger(); modelData.trigger();
@ -92,6 +80,7 @@ OverlayDrawer {
} else { } else {
console.warning("Don't know how to trigger the action") console.warning("Don't know how to trigger the action")
} }
root.opened = false;
} }
} }
} }

View file

@ -142,51 +142,30 @@ OverlayDrawer {
interactive: contentHeight > height interactive: contentHeight > height
footer: ListItem { footer: BasicListItem {
visible: level > 0 visible: level > 0
enabled: true enabled: true
RowLayout { icon: "go-previous"
height: Units.iconSizes.smallMedium + Units.smallSpacing * 2 label: typeof i18n !== "undefined" ? i18n("Back") : "Back"
anchors {
left: parent.left
}
Icon {
Layout.minimumWidth: height
Layout.maximumWidth: Layout.minimumWidth
Layout.fillHeight: true
source: "go-previous"
}
Label {
text: typeof i18n !== "undefined" ? i18n("Back") : "Back"
}
}
onClicked: pageRow.pop() onClicked: pageRow.pop()
} }
delegate: ListItem { delegate: BasicListItem {
enabled: true enabled: true
RowLayout { checked: modelData.checked
height: implicitHeight + Units.smallSpacing * 2 icon: modelData.iconName
label: modelData.text
Icon {
anchors { anchors {
left: parent.left top: parent.top
bottom: parent.bottom
right: parent.right right: parent.right
} }
Icon { width: height
Layout.maximumWidth: height
Layout.fillHeight: true
source: modelData.iconName
}
Label {
Layout.fillWidth: true
text: modelData.text
}
Icon {
Layout.minimumWidth: height
Layout.maximumWidth: Layout.minimumWidth
Layout.fillHeight: true
source: "go-next" source: "go-next"
visible: modelData.children != undefined visible: modelData.children != undefined
} }
}
onClicked: { onClicked: {
if (modelData.children) { if (modelData.children) {
pageRow.push(menuComponent, {"model": modelData.children, "level": level + 1}); pageRow.push(menuComponent, {"model": modelData.children, "level": level + 1});

View file

@ -98,14 +98,33 @@ Item {
Rectangle { Rectangle {
id : background id: shadowHolder
color: Theme.backgroundColor color: Theme.backgroundColor
x: itemMouse.x + itemMouse.width
width: parent.width width: parent.width
height: parent.height height: parent.height
}
InnerShadow {
anchors.fill: shadowHolder
radius: Units.smallSpacing * 2
samples: 16
horizontalOffset: verticalOffset
verticalOffset: Units.smallSpacing / 2
color: Qt.rgba(0, 0, 0, 0.3)
source: shadowHolder
}
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
drag {
target: itemMouse
axis: Drag.XAxis
maximumX: 0
}
onClicked: itemMouse.x = 0; onClicked: itemMouse.x = 0;
onPressed: handleArea.mouseDown(mouse);
onPositionChanged: handleArea.positionChanged(mouse);
onReleased: handleArea.released(mouse);
} }
RowLayout { RowLayout {
anchors { anchors {
@ -116,7 +135,7 @@ Item {
height: Math.min( parent.height / 1.5, Units.iconSizes.medium) height: Math.min( parent.height / 1.5, Units.iconSizes.medium)
property bool exclusive: false property bool exclusive: false
property Item checkedButton property Item checkedButton
spacing: 0 spacing: Units.largeSpacing
Repeater { Repeater {
model: { model: {
if (listItem.actions.length == 0) { if (listItem.actions.length == 0) {
@ -128,11 +147,15 @@ Item {
listItem.actions[0]; listItem.actions[0];
} }
} }
delegate: ToolButton { delegate: Icon {
Layout.fillHeight: true Layout.fillHeight: true
Layout.minimumWidth: height Layout.minimumWidth: height
iconName: modelData.iconName source: modelData.iconName
property bool flat: false MouseArea {
anchors {
fill: parent
margins: -Units.smallSpacing
}
onClicked: { onClicked: {
if (modelData && modelData.trigger !== undefined) { if (modelData && modelData.trigger !== undefined) {
modelData.trigger(); modelData.trigger();
@ -148,44 +171,7 @@ Item {
} }
} }
} }
InnerShadow {
anchors.fill: parent
radius: Units.smallSpacing * 2
samples: 16
horizontalOffset: 0
verticalOffset: Units.smallSpacing / 2
color: Qt.rgba(0, 0, 0, 0.3)
source: background
}
LinearGradient {
id: shadow
//TODO: depends from app layout
property bool inverse: true
width: Units.smallSpacing * 2
anchors {
right: shadow.inverse ? undefined : itemMouse.left
left: shadow.inverse ? itemMouse.right : undefined
top: itemMouse.top
bottom: itemMouse.bottom
rightMargin: -1
}
start: Qt.point(0, 0)
end: Qt.point(Units.smallSpacing*2, 0)
gradient: Gradient {
GradientStop {
position: 0.0
color: shadow.inverse ? Qt.rgba(0, 0, 0, 0.3) : "transparent"
}
GradientStop {
position: shadow.inverse ? 0.3 : 0.7
color: Qt.rgba(0, 0, 0, 0.15)
}
GradientStop {
position: 1.0
color: shadow.inverse ? "transparent" : Qt.rgba(0, 0, 0, 0.3)
}
}
}
MouseArea { MouseArea {
id: itemMouse id: itemMouse
@ -223,7 +209,27 @@ Item {
} }
} }
Timer {
id: speedSampler
interval: 100
repeat: true
property real speed
property real oldItemMouseX
onTriggered: {
speed = itemMouse.x - oldItemMouseX;
oldItemMouseX = itemMouse.x;
}
onRunningChanged: {
if (running) {
speed = 0;
} else {
speed = itemMouse.x - oldItemMouseX;
}
oldItemMouseX = itemMouse.x;
}
}
MouseArea { MouseArea {
id: handleArea
width: Units.iconSizes.smallMedium width: Units.iconSizes.smallMedium
height: width height: width
preventStealing: true preventStealing: true
@ -236,12 +242,23 @@ Item {
target: itemMouse target: itemMouse
axis: Drag.XAxis axis: Drag.XAxis
maximumX: 0 maximumX: 0
minimumX: -listItem.width
} }
function mouseDown(mouse) {
speedSampler.speed = 0;
speedSampler.running = true;
}
onPressed: mouseDown(mouse);
onCanceled: speedSampler.running = false;
onReleased: { onReleased: {
if (itemMouse.x > -itemMouse.width/2) { speedSampler.running = false;
if (speedSampler.speed < -Units.gridUnit * 3) {
itemMouse.x = -itemMouse.width + width * 2;
} else if (speedSampler.speed > Units.gridUnit * 3 || itemMouse.x > -itemMouse.width/3) {
itemMouse.x = 0; itemMouse.x = 0;
} else { } else {
itemMouse.x = -itemMouse.width + width * 2 itemMouse.x = -itemMouse.width + width * 2;
} }
} }
onClicked: { onClicked: {

View file

@ -53,30 +53,63 @@ AbstractDrawer {
default property alias page: mainPage.data default property alias page: mainPage.data
property Item contentItem property Item contentItem
property alias opened: browserFrame.open property alias opened: mainFlickable.open
property int edge: Qt.LeftEdge property int edge: Qt.LeftEdge
property real position: 0 property real position: 0
onContentItemChanged: contentItem.parent = drawerPage
onPositionChanged: { onPositionChanged: {
if (!enabled) { if (!mainFlickable.flicking && !mainFlickable.dragging && !mainAnim.running) {
return; switch (root.edge) {
} case Qt.RightEdge:
if (root.edge == Qt.LeftEdge) { mainFlickable.contentX = drawerPage.width * position;
browserFrame.x = -browserFrame.width + position * browserFrame.width; break;
} else { case Qt.LeftEdge:
browserFrame.x = root.width - (position * browserFrame.width); mainFlickable.contentX = drawerPage.width * (1-position);
break;
case Qt.BottomEdge:
mainFlickable.contentY = drawerPage.height * position;
break;
} }
} }
}
onContentItemChanged: {
contentItem.parent = drawerPage
contentItem.anchors.fill = drawerPage
}
function open () { function open () {
mouseEventListener.startBrowserFrameX = browserFrame.x; mainAnim.to = 0;
browserFrame.state = "Dragging"; switch (root.edge) {
browserFrame.state = "Open"; case Qt.RightEdge:
mainAnim.to = drawerPage.width;
break;
case Qt.BottomEdge:
mainAnim.to = drawerPage.height;
break;
case Qt.LeftEdge:
case Qt.TopEdge:
default:
mainAnim.to = 0;
break;
}
mainAnim.running = true;
mainFlickable.open = true;
} }
function close () { function close () {
mouseEventListener.startBrowserFrameX = browserFrame.x; switch (root.edge) {
browserFrame.state = "Dragging"; case Qt.RightEdge:
browserFrame.state = "Closed"; case Qt.BottomEdge:
mainAnim.to = 0;
break;
case Qt.LeftEdge:
mainAnim.to = drawerPage.width;
break;
case Qt.TopEdge:
mainAnim.to = drawerPage.height;
break;
}
mainAnim.running = true;
mainFlickable.open = false;
} }
Item { Item {
@ -88,164 +121,235 @@ AbstractDrawer {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: "black" color: "black"
opacity: 0.6 * (root.edge == Qt.LeftEdge opacity: 0.6 * mainFlickable.internalPosition
? ((browserFrame.x + browserFrame.width) / browserFrame.width) }
: (1 - browserFrame.x / root.width))
NumberAnimation {
id: mainAnim
target: mainFlickable
properties: (root.edge == Qt.RightEdge || root.edge == Qt.LeftEdge) ? "contentX" : "contentY"
duration: Units.longDuration
easing.type: Easing.InOutQuad
} }
MouseArea { MouseArea {
id: edgeMouse
anchors { anchors {
right: root.edge == Qt.LeftEdge ? undefined : parent.right right: root.edge == Qt.LeftEdge ? undefined : parent.right
left: root.edge == Qt.LeftEdge ? parent.left : undefined left: root.edge == Qt.RightEdge ? undefined : parent.left
top: parent.top top: root.edge == Qt.BottomEdge ? undefined : parent.top
bottom: parent.bottom bottom: root.edge == Qt.TopEdge ? undefined : parent.bottom
} }
z: 99 z: 99
width: Units.smallSpacing width: Units.smallSpacing * 2
onPressed: mouseEventListener.managePressed(mouse) height: Units.smallSpacing * 2
onPositionChanged: mouseEventListener.positionChanged(mouse)
onReleased: mouseEventListener.released(mouse)
}
MouseArea {
id: mouseEventListener
anchors.fill: parent
drag.filterChildren: true
property int startBrowserFrameX
property int startMouseX property int startMouseX
property real oldMouseX property real oldMouseX
property int startMouseY
property real oldMouseY
property bool startDragging: false property bool startDragging: false
property string startState
enabled: browserFrame.state != "Closed"
onPressed: managePressed(mouse) onPressed: {
function managePressed(mouse) {
if (drawerPage.children.length == 0) { if (drawerPage.children.length == 0) {
mouse.accepted = false; mouse.accepted = false;
return; return;
} }
speedSampler.restart();
mouse.accepted = true; mouse.accepted = true;
startBrowserFrameX = browserFrame.x;
oldMouseX = startMouseX = mouse.x; oldMouseX = startMouseX = mouse.x;
oldMouseY = startMouseY = mouse.y;
startDragging = false; startDragging = false;
startState = browserFrame.state;
browserFrame.state = "Dragging";
browserFrame.x = startBrowserFrameX;
} }
onPositionChanged: { onPositionChanged: {
if (drawerPage.children.length == 0) { if (!root.contentItem) {
mouse.accepted = false; mouse.accepted = false;
return; return;
} }
if (mouse.x < Units.gridUnit || if (Math.abs(mouse.x - startMouseX) > root.width / 5 ||
Math.abs(mouse.x - startMouseX) > root.width / 5) { Math.abs(mouse.y - startMouseY) > root.height / 5) {
startDragging = true; startDragging = true;
} }
if (startDragging) { if (startDragging) {
browserFrame.x = root.edge == Qt.LeftEdge switch (root.edge) {
? Math.min(0, browserFrame.x + mouse.x - oldMouseX) case Qt.RightEdge:
: Math.max(root.width - browserFrame.width, browserFrame.x + mouse.x - oldMouseX); mainFlickable.contentX = Math.min(mainItem.width - root.width, mainFlickable.contentX + oldMouseX - mouse.x);
break;
case Qt.LeftEdge:
mainFlickable.contentX = Math.max(0, mainFlickable.contentX + oldMouseX - mouse.x);
break;
case Qt.BottomEdge:
mainFlickable.contentY = Math.min(mainItem.height - root.height, mainFlickable.contentY + oldMouseY - mouse.y);
break;
case Qt.TopEdge:
mainFlickable.contentY = Math.max(0, mainFlickable.contentY + oldMouseY - mouse.y);
break;
}
} }
oldMouseX = mouse.x; oldMouseX = mouse.x;
oldMouseY = mouse.y;
} }
onReleased: { onReleased: {
if (drawerPage.children.length == 0) { speedSampler.running = false;
mouse.accepted = false; if (speedSampler.speed != 0) {
return; if (root.edge == Qt.RightEdge || root.edge == Qt.LeftEdge) {
mainFlickable.flick(speedSampler.speed, 0);
} else {
mainFlickable.flick(0, speedSampler.speed);
}
} else {
if (mainFlickable.internalPosition > 0.5) {
root.open();
} else {
root.close();
}
}
}
} }
if (root.edge == Qt.LeftEdge) { Timer {
if (mouse.x < Units.gridUnit) { id: speedSampler
browserFrame.state = "Closed"; interval: 100
} else if (browserFrame.x - startBrowserFrameX > browserFrame.width / 3) { repeat: true
browserFrame.state = "Open"; property real speed
} else if (startBrowserFrameX - browserFrame.x > browserFrame.width / 3) { property real oldContentX
browserFrame.state = "Closed"; property real oldContentY
onTriggered: {
if (root.edge == Qt.RightEdge || root.edge == Qt.LeftEdge) {
speed = (mainFlickable.contentX - oldContentX) * 10;
oldContentX = mainFlickable.contentX;
} else { } else {
browserFrame.state = startState speed = (mainFlickable.contentY - oldContentY) * 10;
oldContentY = mainFlickable.contentY;
}
}
onRunningChanged: {
if (running) {
speed = 0;
oldContentX = mainFlickable.contentX;
oldContentY = mainFlickable.contentY;
} else {
if (root.edge == Qt.RightEdge || root.edge == Qt.LeftEdge) {
speed = (oldContentX - mainFlickable.contentX) * 10;
} else {
speed = (oldContentY - mainFlickable.contentY) * 10;
}
}
}
} }
} else { MouseArea {
if (mouse.x > width - Units.gridUnit) { id: mainMouseArea
browserFrame.state = "Closed"; anchors.fill: parent
} else if (browserFrame.x - startBrowserFrameX > browserFrame.width / 3) { drag.filterChildren: true
browserFrame.state = "Closed";
} else if (startBrowserFrameX - browserFrame.x > browserFrame.width / 3) {
browserFrame.state = "Open";
} else {
browserFrame.state = startState;
}
}
}
onCanceled: {
if (oldMouseX > width - Units.gridUnit) {
browserFrame.state = "Closed";
} else if (Math.abs(browserFrame.x - startBrowserFrameX) > browserFrame.width / 3) {
browserFrame.state = startState == "Open" ? "Closed" : "Open";
} else {
browserFrame.state = "Open";
}
}
onClicked: { onClicked: {
if (Math.abs(startMouseX - mouse.x) > Units.gridUnit) { if ((root.edge == Qt.LeftEdge && mouse.x < drawerPage.width) ||
(root.edge == Qt.RightEdge && mouse.x > drawerPage.x) ||
(root.edge == Qt.TopEdge && mouse.y < drawerPage.height) ||
(root.edge == Qt.BottomEdge && mouse.y > drawerPage.y)) {
return; return;
} }
if ((root.edge == Qt.LeftEdge && mouse.x > browserFrame.width) ||
(root.edge != Qt.LeftEdge && mouse.x < browserFrame.x)) {
browserFrame.state = startState == "Open" ? "Closed" : "Open";
root.clicked(); root.clicked();
root.close();
} }
} enabled: (root.edge == Qt.LeftEdge && !mainFlickable.atXEnd) ||
Rectangle { (root.edge == Qt.RightEdge && !mainFlickable.atXBeginning) ||
id: browserFrame (root.edge == Qt.TopEdge && !mainFlickable.atYEnd) ||
z: 100 (root.edge == Qt.BottomEdge && !mainFlickable.atYBeginning) ||
color: Theme.viewBackgroundColor mainFlickable.moving
anchors {
top: parent.top
bottom: parent.bottom
}
width: { Flickable {
if (drawerPage.children.length > 0 && drawerPage.children[0].implicitWidth > 0) { id: mainFlickable
return Math.min( parent.width - Units.gridUnit, drawerPage.children[0].implicitWidth) property bool open
} else { anchors.fill: parent
return parent.width - Units.gridUnit * 3
}
}
onXChanged: {
root.position = root.edge == Qt.LeftEdge ? 1 + browserFrame.x/browserFrame.width : (root.width - browserFrame.x)/browserFrame.width;
}
state: "Closed"
onStateChanged: open = (state != "Closed")
property bool open: false
onOpenChanged: { onOpenChanged: {
if (browserFrame.state == "Dragging" || drawerPage.children.length == 0) {
return;
}
if (open) { if (open) {
browserFrame.state = "Open"; root.open();
} else { } else {
browserFrame.state = "Closed"; root.close();
}
}
enabled: parent.enabled
flickableDirection: root.edge == Qt.LeftEdge || root.edge == Qt.RightEdge ? Flickable.HorizontalFlick : Flickable.VerticalFlick
contentWidth: mainItem.width
contentHeight: mainItem.height
boundsBehavior: Flickable.StopAtBounds
property real internalPosition: {
switch (root.edge) {
case Qt.RightEdge:
return mainFlickable.contentX/drawerPage.width;
case Qt.LeftEdge:
return 1 - (mainFlickable.contentX/drawerPage.width);
case Qt.BottomEdge:
return mainFlickable.contentY/drawerPage.height;
case Qt.TopEdge:
return 1 - (mainFlickable.contentY/drawerPage.height);
}
}
onInternalPositionChanged: {
root.position = internalPosition;
}
onFlickingChanged: {
if (!flicking) {
if (internalPosition > 0.5) {
root.open();
} else {
root.close();
}
}
}
onMovingChanged: {
if (!moving) {
flickingChanged();
} }
} }
Item {
id: mainItem
width: root.width + ((root.edge == Qt.RightEdge || root.edge == Qt.LeftEdge) ? drawerPage.width : 0)
height: root.height + ((root.edge == Qt.TopEdge || root.edge == Qt.BottomEdge) ? drawerPage.height : 0)
onWidthChanged: {
if (root.edge == Qt.LeftEdge) {
mainFlickable.contentX = drawerPage.width;
}
}
onHeightChanged: {
if (root.edge == Qt.TopEdge) {
mainFlickable.contentY = drawerPage.Height;
}
}
Rectangle {
id: drawerPage
anchors {
left: root.edge != Qt.RightEdge ? parent.left : undefined
right: root.edge != Qt.LeftEdge ? parent.right : undefined
top: root.edge != Qt.BottomEdge ? parent.top : undefined
bottom: root.edge != Qt.TopEdge ? parent.bottom : undefined
}
color: Theme.viewBackgroundColor
clip: true
width: root.contentItem ? Math.min(root.contentItem.implicitWidth, root.width - Units.gridUnit * 2) : 0
height: root.contentItem ? Math.min(root.contentItem.implicitHeight, root.height - Units.gridUnit * 2) : 0
}
LinearGradient { LinearGradient {
width: Units.gridUnit/2 width: Units.gridUnit/2
height: Units.gridUnit/2
anchors { anchors {
right: root.edge == Qt.LeftEdge ? undefined : parent.left right: root.edge == Qt.RightEdge ? drawerPage.left : (root.edge == Qt.LeftEdge ? undefined : parent.right)
left: root.edge == Qt.LeftEdge ? parent.right : undefined left: root.edge == Qt.LeftEdge ? drawerPage.right : (root.edge == Qt.RightEdge ? undefined : parent.left)
top: parent.top top: root.edge == Qt.TopEdge ? drawerPage.bottom : (root.edge == Qt.BottomEdge ? undefined : parent.top)
bottom: parent.bottom bottom: root.edge == Qt.BottomEdge ? drawerPage.top : (root.edge == Qt.TopEdge ? undefined : parent.bottom)
} }
opacity: root.position == 0 ? 0 : 1 opacity: root.position == 0 ? 0 : 1
start: Qt.point(0, 0) start: Qt.point(0, 0)
end: Qt.point(Units.gridUnit/2, 0) end: (root.edge == Qt.RightEdge || root.edge == Qt.LeftEdge) ? Qt.point(Units.gridUnit/2, 0) : Qt.point(0, Units.gridUnit/2)
gradient: Gradient { gradient: Gradient {
GradientStop { GradientStop {
position: 0.0 position: 0.0
@ -267,57 +371,7 @@ AbstractDrawer {
} }
} }
} }
MouseArea {
id: drawerPage
anchors {
fill: parent
//leftMargin: Units.gridUnit
} }
clip: true
onChildrenChanged: drawerPage.children[0].anchors.fill = drawerPage
}
states: [
State {
name: "Open"
PropertyChanges {
target: browserFrame
x: root.edge == Qt.LeftEdge ? 0 : root.width - browserFrame.width
}
},
State {
name: "Dragging"
//workaround for a quirkiness of the state machine
//if no x binding gets defined in this state x will be set to whatever last x it had last time it was in this state
PropertyChanges {
target: browserFrame
x: mouseEventListener.startBrowserFrameX
}
},
State {
name: "Closed"
PropertyChanges {
target: browserFrame
x: root.edge == Qt.LeftEdge ? -browserFrame.width : root.width
}
}
]
transitions: [
Transition {
//Exclude Dragging
to: "Open,Closed"
NumberAnimation {
id: transitionAnim
properties: "x"
duration: Units.longDuration
easing.type: Easing.InOutQuad
}
}
]
} }
} }
} }

View file

@ -47,23 +47,10 @@ Rectangle {
*/ */
property alias contextualActions: internalContextualActions.data property alias contextualActions: internalContextualActions.data
property Flickable flickable
Item { Item {
id: internalContextualActions id: internalContextualActions
} }
Layout.fillWidth: true Layout.fillWidth: true
color: "transparent" color: "transparent"
/*
Connections {
target: flickable
property real oldContentY: (flickable == null) ? 0 : flickable.contentY
onContentYChanged: {
actionButton.transform[0].y = Math.min(actionButton.height, Math.max(0, actionButton.transform[0].y + (flickable.contentY - oldContentY)));
oldContentY = flickable.contentY;
}
}
*/
} }

View file

@ -56,7 +56,7 @@ Item {
property int depth: Engine.getDepth() property int depth: Engine.getDepth()
property Item currentPage: null property Item currentPage: null
property Item lastVisiblePage property Item lastVisiblePage: currentPage
property ToolBar toolBar property ToolBar toolBar
property variant initialPage property variant initialPage
//A column is wide enough for 30 characters //A column is wide enough for 30 characters
@ -154,7 +154,10 @@ Item {
return; return;
} }
actualRoot.lastVisiblePage = root.children[Math.floor((mainFlickable.contentX + mainFlickable.width - 1)/columnWidth)].page actualRoot.lastVisiblePage = root.children[Math.floor((mainFlickable.contentX + mainFlickable.width - 1)/columnWidth)].page;
if (!actualRoot.lastVisiblePage) {
actualRoot.lastVisiblePage = actualRoot.currentPage;
}
} }
} }
} }

View file

@ -1,144 +1,76 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="24" height="24" id="svg3869" version="1.1" inkscape:version="0.91 r13725" sodipodi:docname="go-next.svg">
<svg <defs id="defs3871">
xmlns:dc="http://purl.org/dc/elements/1.1/" <style type="text/css" id="current-color-scheme">
xmlns:cc="http://creativecommons.org/ns#" .ColorScheme-Text {
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" color:#4d4d4d;
xmlns:svg="http://www.w3.org/2000/svg" }
xmlns="http://www.w3.org/2000/svg" .ColorScheme-Background {
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" color:#eff0f1;
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" }
width="24" .ColorScheme-Highlight {
height="24" color:#3daee9;
id="svg3869" }
version="1.1" .ColorScheme-ViewText {
inkscape:version="0.91 r13725" color:#31363b;
sodipodi:docname="go-next.svg"> }
<defs .ColorScheme-ViewBackground {
id="defs3871"> color:#fcfcfc;
<linearGradient }
id="linearGradient3257"> .ColorScheme-ViewHover {
<stop color:#93cee9;
offset="0" }
style="stop-color:#a50000;stop-opacity:1" .ColorScheme-ViewFocus{
id="stop3259" /> color:#3daee9;
<stop }
offset="1" .ColorScheme-ButtonText {
style="stop-color:#e73800;stop-opacity:1" color:#31363b;
id="stop3261" /> }
.ColorScheme-ButtonBackground {
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#93cee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}
</style>
<linearGradient id="linearGradient3257">
<stop offset="0" style="stop-color:#a50000;stop-opacity:1" id="stop3259"/>
<stop offset="1" style="stop-color:#e73800;stop-opacity:1" id="stop3261"/>
</linearGradient> </linearGradient>
<clipPath <clipPath clipPathUnits="userSpaceOnUse" id="clipPath4210">
clipPathUnits="userSpaceOnUse" <rect y="1024.3622" x="-7" height="34" width="34" id="rect4212" style="opacity:1;fill:#0000ff;fill-opacity:0.51376145;stroke:none;stroke-opacity:1"/>
id="clipPath4210">
<rect
y="1024.3622"
x="-7"
height="34"
width="34"
id="rect4212"
style="opacity:1;fill:#0000ff;fill-opacity:0.51376145;stroke:none;stroke-opacity:1" />
</clipPath> </clipPath>
<clipPath <clipPath clipPathUnits="userSpaceOnUse" id="clipPath4160">
clipPathUnits="userSpaceOnUse" <rect style="opacity:1;fill:#aade87;fill-opacity:0.47247709;stroke:none;stroke-opacity:1" id="rect4162" width="32" height="32.000015" x="-6" y="1028.3619"/>
id="clipPath4160">
<rect
style="opacity:1;fill:#aade87;fill-opacity:0.47247709;stroke:none;stroke-opacity:1"
id="rect4162"
width="32"
height="32.000015"
x="-6"
y="1028.3619" />
</clipPath> </clipPath>
</defs> </defs>
<sodipodi:namedview <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="22.627416" inkscape:cx="5.4926209" inkscape:cy="10.264796" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:window-width="1366" inkscape:window-height="709" inkscape:window-x="-4" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:showpageshadow="false" inkscape:object-nodes="true" inkscape:snap-bbox="true">
id="base" <inkscape:grid type="xygrid" id="grid4132"/>
pagecolor="#ffffff" <sodipodi:guide position="4,18" orientation="18,0" id="guide4138"/>
bordercolor="#666666" <sodipodi:guide position="5,3" orientation="0,18" id="guide4140"/>
borderopacity="1.0" <sodipodi:guide position="20,2.0000174" orientation="-18,0" id="guide4142"/>
inkscape:pageopacity="0.0" <sodipodi:guide position="2,21" orientation="0,-18" id="guide4144"/>
inkscape:pageshadow="2" <sodipodi:guide position="3,19.000017" orientation="16,0" id="guide4146"/>
inkscape:zoom="22.627416" <sodipodi:guide position="2,4" orientation="0,16" id="guide4148"/>
inkscape:cx="5.4926209" <sodipodi:guide position="21,20" orientation="-16,0" id="guide4150"/>
inkscape:cy="10.264796" <sodipodi:guide position="2,20" orientation="0,-16" id="guide4152"/>
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1366"
inkscape:window-height="709"
inkscape:window-x="-4"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:showpageshadow="false"
inkscape:object-nodes="true"
inkscape:snap-bbox="true">
<inkscape:grid
type="xygrid"
id="grid4132" />
<sodipodi:guide
position="4,18"
orientation="18,0"
id="guide4138" />
<sodipodi:guide
position="5,3"
orientation="0,18"
id="guide4140" />
<sodipodi:guide
position="20,2.0000174"
orientation="-18,0"
id="guide4142" />
<sodipodi:guide
position="2,21"
orientation="0,-18"
id="guide4144" />
<sodipodi:guide
position="3,19.000017"
orientation="16,0"
id="guide4146" />
<sodipodi:guide
position="2,4"
orientation="0,16"
id="guide4148" />
<sodipodi:guide
position="21,20"
orientation="-16,0"
id="guide4150" />
<sodipodi:guide
position="2,20"
orientation="0,-16"
id="guide4152" />
</sodipodi:namedview> </sodipodi:namedview>
<metadata <metadata id="metadata3874">
id="metadata3874">
<rdf:RDF> <rdf:RDF>
<cc:Work <cc:Work rdf:about="">
rdf:about="">
<dc:format>image/svg+xml</dc:format> <dc:format>image/svg+xml</dc:format>
<dc:type <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <dc:title/>
<dc:title></dc:title>
</cc:Work> </cc:Work>
</rdf:RDF> </rdf:RDF>
</metadata> </metadata>
<g <g inkscape:label="Capa 1" inkscape:groupmode="layer" id="layer1" transform="translate(-326,-532.3622)">
inkscape:label="Capa 1" <g transform="translate(326,-497)" id="layer1-9" inkscape:label="Capa 1">
inkscape:groupmode="layer" <path id="rect4176" transform="translate(-5e-7,1030.3622)" d="M 7.7070312,3 7,3.7070312 l 6.125,6.125 L 14.292969,11 13.125,12.167969 7,18.292969 7.7070312,19 13.832031,12.875 15.707031,11 13.832031,9.125 7.7070312,3 Z" style="fill:currentColor;fill-opacity:1;stroke:none" inkscape:connector-curvature="0" class="ColorScheme-Text"/>
id="layer1"
transform="translate(-326,-532.3622)">
<g
transform="translate(326,-497)"
id="layer1-9"
inkscape:label="Capa 1">
<path
id="rect4176"
transform="translate(-5e-7,1030.3622)"
d="M 7.7070312,3 7,3.7070312 l 6.125,6.125 L 14.292969,11 13.125,12.167969 7,18.292969 7.7070312,19 13.832031,12.875 15.707031,11 13.832031,9.125 7.7070312,3 Z"
style="fill:#4d4d4d;fill-opacity:1;stroke:none"
inkscape:connector-curvature="0" />
</g> </g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 4 KiB

View file

@ -1,463 +1,127 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --> <!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="24" height="24" id="svg3869" version="1.1" inkscape:version="0.91 r13725" sodipodi:docname="go-previous.svg">
<svg <defs id="defs3871">
xmlns:dc="http://purl.org/dc/elements/1.1/" <style type="text/css" id="current-color-scheme">
xmlns:cc="http://creativecommons.org/ns#" .ColorScheme-Text {
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" color:#4d4d4d;
xmlns:svg="http://www.w3.org/2000/svg" }
xmlns="http://www.w3.org/2000/svg" .ColorScheme-Background {
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" color:#eff0f1;
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" }
width="24" .ColorScheme-Highlight {
height="24" color:#3daee9;
id="svg3869" }
version="1.1" .ColorScheme-ViewText {
inkscape:version="0.91 r13725" color:#31363b;
sodipodi:docname="go-previous.svg"> }
<defs .ColorScheme-ViewBackground {
id="defs3871"> color:#fcfcfc;
<linearGradient }
id="linearGradient3257"> .ColorScheme-ViewHover {
<stop color:#93cee9;
offset="0" }
style="stop-color:#a50000;stop-opacity:1" .ColorScheme-ViewFocus{
id="stop3259" /> color:#3daee9;
<stop }
offset="1" .ColorScheme-ButtonText {
style="stop-color:#e73800;stop-opacity:1" color:#31363b;
id="stop3261" /> }
.ColorScheme-ButtonBackground {
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#93cee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}
</style>
<linearGradient id="linearGradient3257">
<stop offset="0" style="stop-color:#a50000;stop-opacity:1" id="stop3259"/>
<stop offset="1" style="stop-color:#e73800;stop-opacity:1" id="stop3261"/>
</linearGradient> </linearGradient>
<clipPath <inkscape:perspective id="perspective4146-36" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
clipPathUnits="userSpaceOnUse" <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-7"/>
id="clipPath4210"> <inkscape:perspective id="perspective4146-0" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
<rect <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-8"/>
y="1024.3622" <inkscape:perspective id="perspective4146-3" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
x="-7" <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146"/>
height="34" <inkscape:perspective id="perspective4146-36-7" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
width="34" <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-7-6"/>
id="rect4212" <inkscape:perspective id="perspective4146-0-6" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
style="opacity:1;fill:#0000ff;fill-opacity:0.51376145;stroke:none;stroke-opacity:1" /> <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-8-7"/>
<inkscape:perspective id="perspective4146-3-9" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-2"/>
<inkscape:perspective id="perspective4146-36-4" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-7-7"/>
<inkscape:perspective id="perspective4146-0-0" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-8-6"/>
<inkscape:perspective id="perspective4146-3-81" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-6"/>
<inkscape:perspective id="perspective4146-36-7-2" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-7-6-3"/>
<inkscape:perspective id="perspective4146-0-6-4" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-8-7-6"/>
<inkscape:perspective id="perspective4146-3-9-0" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-2-1"/>
<inkscape:perspective id="perspective4146-36-8" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-7-0"/>
<inkscape:perspective id="perspective4146-0-3" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-8-78"/>
<inkscape:perspective id="perspective4146-3-1" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-05"/>
<inkscape:perspective id="perspective4146-36-3" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-7-8"/>
<inkscape:perspective id="perspective4146-0-9" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-8-3"/>
<inkscape:perspective id="perspective4146-3-4" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-9"/>
<inkscape:perspective id="perspective4146-36-7-6" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-7-6-0"/>
<inkscape:perspective id="perspective4146-0-6-7" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-8-7-7"/>
<inkscape:perspective id="perspective4146-3-9-7" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-2-13"/>
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4210">
<rect y="1024.3622" x="-7" height="34" width="34" id="rect4212" style="opacity:1;fill:#0000ff;fill-opacity:0.51376145;stroke:none;stroke-opacity:1"/>
</clipPath> </clipPath>
<clipPath <clipPath clipPathUnits="userSpaceOnUse" id="clipPath4160">
clipPathUnits="userSpaceOnUse" <rect style="opacity:1;fill:#aade87;fill-opacity:0.47247709;stroke:none;stroke-opacity:1" id="rect4162" width="32" height="32.000015" x="-6" y="1028.3619"/>
id="clipPath4160">
<rect
style="opacity:1;fill:#aade87;fill-opacity:0.47247709;stroke:none;stroke-opacity:1"
id="rect4162"
width="32"
height="32.000015"
x="-6"
y="1028.3619" />
</clipPath> </clipPath>
<clipPath <clipPath id="clipPath4160-4" clipPathUnits="userSpaceOnUse">
id="clipPath4160-4" <rect y="1023.3622" x="7" height="1" width="1" id="rect4162-5" style="opacity:1;fill:#f2f2f2;fill-opacity:1;stroke:none;stroke-opacity:1"/>
clipPathUnits="userSpaceOnUse">
<rect
y="1023.3622"
x="7"
height="1"
width="1"
id="rect4162-5"
style="opacity:1;fill:#f2f2f2;fill-opacity:1;stroke:none;stroke-opacity:1" />
</clipPath> </clipPath>
<clipPath <clipPath clipPathUnits="userSpaceOnUse" id="clipPath16">
clipPathUnits="userSpaceOnUse" <path d="m 0,706.465 1490.926,0 L 1490.926,0 0,0 0,706.465 Z" id="path18"/>
id="clipPath16">
<path
d="m 0,706.465 1490.926,0 L 1490.926,0 0,0 0,706.465 Z"
id="path18" />
</clipPath> </clipPath>
<clipPath <clipPath clipPathUnits="userSpaceOnUse" id="clipPath24">
clipPathUnits="userSpaceOnUse" <path d="m 22.1953,686.117 1447.7347,0 0,-667.1902 -1447.7347,0 L 22.1953,686.117 Z" id="path26"/>
id="clipPath24">
<path
d="m 22.1953,686.117 1447.7347,0 0,-667.1902 -1447.7347,0 L 22.1953,686.117 Z"
id="path26" />
</clipPath> </clipPath>
<inkscape:perspective
id="perspective4146-36"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-3-7" />
<inkscape:perspective
id="perspective4146-0"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-3-8" />
<inkscape:perspective
id="perspective4146-3"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146" />
<inkscape:perspective
id="perspective4146-36-7"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-3-7-6" />
<inkscape:perspective
id="perspective4146-0-6"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-3-8-7" />
<inkscape:perspective
id="perspective4146-3-9"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-2" />
<inkscape:perspective
id="perspective4146-36-4"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-3-7-7" />
<inkscape:perspective
id="perspective4146-0-0"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-3-8-6" />
<inkscape:perspective
id="perspective4146-3-81"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-6" />
<inkscape:perspective
id="perspective4146-36-7-2"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-3-7-6-3" />
<inkscape:perspective
id="perspective4146-0-6-4"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-3-8-7-6" />
<inkscape:perspective
id="perspective4146-3-9-0"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-2-1" />
<inkscape:perspective
id="perspective4146-36-8"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-3-7-0" />
<inkscape:perspective
id="perspective4146-0-3"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-3-8-78" />
<inkscape:perspective
id="perspective4146-3-1"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-05" />
<inkscape:perspective
id="perspective4146-36-3"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-3-7-8" />
<inkscape:perspective
id="perspective4146-0-9"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-3-8-3" />
<inkscape:perspective
id="perspective4146-3-4"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-9" />
<inkscape:perspective
id="perspective4146-36-7-6"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-3-7-6-0" />
<inkscape:perspective
id="perspective4146-0-6-7"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-3-8-7-7" />
<inkscape:perspective
id="perspective4146-3-9-7"
inkscape:persp3d-origin="12 : 8 : 1"
inkscape:vp_z="24 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 12 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 12 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="24 : 12 : 1"
inkscape:persp3d-origin="12 : 8 : 1"
id="perspective4146-2-13" />
</defs> </defs>
<sodipodi:namedview <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="22.627416" inkscape:cx="5.4926209" inkscape:cy="10.264796" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:window-width="1366" inkscape:window-height="709" inkscape:window-x="-4" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:showpageshadow="false" inkscape:object-nodes="true" inkscape:snap-bbox="true">
id="base" <inkscape:grid type="xygrid" id="grid4132"/>
pagecolor="#ffffff" <sodipodi:guide position="4,18" orientation="18,0" id="guide4138"/>
bordercolor="#666666" <sodipodi:guide position="5,3" orientation="0,18" id="guide4140"/>
borderopacity="1.0" <sodipodi:guide position="20,2.0000174" orientation="-18,0" id="guide4142"/>
inkscape:pageopacity="0.0" <sodipodi:guide position="2,21" orientation="0,-18" id="guide4144"/>
inkscape:pageshadow="2" <sodipodi:guide position="3,19.000017" orientation="16,0" id="guide4146"/>
inkscape:zoom="22.627416" <sodipodi:guide position="2,4" orientation="0,16" id="guide4148"/>
inkscape:cx="5.4926209" <sodipodi:guide position="21,20" orientation="-16,0" id="guide4150"/>
inkscape:cy="10.264796" <sodipodi:guide position="2,20" orientation="0,-16" id="guide4152"/>
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1366"
inkscape:window-height="709"
inkscape:window-x="-4"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:showpageshadow="false"
inkscape:object-nodes="true"
inkscape:snap-bbox="true">
<inkscape:grid
type="xygrid"
id="grid4132" />
<sodipodi:guide
position="4,18"
orientation="18,0"
id="guide4138" />
<sodipodi:guide
position="5,3"
orientation="0,18"
id="guide4140" />
<sodipodi:guide
position="20,2.0000174"
orientation="-18,0"
id="guide4142" />
<sodipodi:guide
position="2,21"
orientation="0,-18"
id="guide4144" />
<sodipodi:guide
position="3,19.000017"
orientation="16,0"
id="guide4146" />
<sodipodi:guide
position="2,4"
orientation="0,16"
id="guide4148" />
<sodipodi:guide
position="21,20"
orientation="-16,0"
id="guide4150" />
<sodipodi:guide
position="2,20"
orientation="0,-16"
id="guide4152" />
</sodipodi:namedview> </sodipodi:namedview>
<metadata <metadata id="metadata3874">
id="metadata3874">
<rdf:RDF> <rdf:RDF>
<cc:Work <cc:Work rdf:about="">
rdf:about="">
<dc:format>image/svg+xml</dc:format> <dc:format>image/svg+xml</dc:format>
<dc:type <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <dc:title/>
<dc:title></dc:title>
</cc:Work> </cc:Work>
</rdf:RDF> </rdf:RDF>
</metadata> </metadata>
<g <g inkscape:label="Capa 1" inkscape:groupmode="layer" id="layer1" transform="translate(-326,-532.3622)">
inkscape:label="Capa 1" <g transform="translate(326.70703,-497)" id="layer1-2" inkscape:label="Capa 1">
inkscape:groupmode="layer" <path id="rect4176" transform="translate(-5e-7,1030.3622)" d="m 14.292969,3 -6.1250002,6.125 -1.875,1.875 1.875,1.875 L 14.292969,19 15,18.292969 8.875,12.167969 7.7070312,11 8.875,9.8320312 15,3.7070312 14.292969,3 Z" style="fill:currentColor;fill-opacity:1;stroke:none" inkscape:connector-curvature="0" class="ColorScheme-Text"/>
id="layer1"
transform="translate(-326,-532.3622)">
<g
transform="translate(326.70703,-497)"
id="layer1-2"
inkscape:label="Capa 1">
<path
id="rect4176"
transform="translate(-5e-7,1030.3622)"
d="m 14.292969,3 -6.1250002,6.125 -1.875,1.875 1.875,1.875 L 14.292969,19 15,18.292969 8.875,12.167969 7.7070312,11 8.875,9.8320312 15,3.7070312 14.292969,3 Z"
style="fill:#4d4d4d;fill-opacity:1;stroke:none"
inkscape:connector-curvature="0" />
</g> </g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -27,6 +27,8 @@ MouseArea {
property alias iconSource: icon.source property alias iconSource: icon.source
property bool checkable: false property bool checkable: false
property bool checked: false property bool checked: false
//either Action or QAction should work here
property QtObject action
Layout.minimumWidth: Units.iconSizes.large Layout.minimumWidth: Units.iconSizes.large
Layout.maximumWidth: Layout.minimumWidth Layout.maximumWidth: Layout.minimumWidth
implicitWidth: Units.iconSizes.large implicitWidth: Units.iconSizes.large
@ -34,8 +36,8 @@ MouseArea {
drag { drag {
target: button target: button
axis: Drag.XAxis axis: Drag.XAxis
minimumX: contextDrawer ? 0 : parent.width/2 - width/2 minimumX: parent.width/2 - width/2 - (contextDrawer && contextDrawer.enabled ? contextDrawer.contentItem.width : 0)
maximumX: globalDrawer ? parent.width : parent.width/2 - width/2 maximumX: parent.width/2 - width/2 + (globalDrawer && globalDrawer.enabled ? globalDrawer.contentItem.width : 0)
} }
function toggleVisibility() { function toggleVisibility() {
showAnimation.running = false; showAnimation.running = false;
@ -74,6 +76,11 @@ MouseArea {
if (checkable) { if (checkable) {
checked = !checked; checked = !checked;
} }
//if an action has been assigned, trigger it
if (button.action && button.action.trigger) {
button.action.trigger();
}
} }
Connections { Connections {
target: globalDrawer target: globalDrawer

View file

@ -16,4 +16,6 @@ Icon 0.2 Icon.qml
Label 0.2 Label.qml Label 0.2 Label.qml
Heading 0.2 Heading.qml Heading 0.2 Heading.qml
ListItem 0.2 ListItem.qml ListItem 0.2 ListItem.qml
BasicListItem 0.2 BasicListItem.qml
ListItemWithActions 0.2 ListItemWithActions.qml ListItemWithActions 0.2 ListItemWithActions.qml
RefreshableScrollView 0.2 RefreshableScrollView.qml