From f8fb9181b2e95f76bb1170d2cd7c7bf920a9c414 Mon Sep 17 00:00:00 2001 From: Sebastian Kügler Date: Mon, 30 Nov 2015 02:35:17 +0100 Subject: sync with mobilecomponents 68c6dc9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes spacing around the icon in the left drawer, the stretched-out icons in the navigation menu, the unnecessary scrolling in the same menu, and a few other things. Signed-off-by: Sebastian Kügler --- qt-mobile/qml/mobilecomponents/GlobalDrawer.qml | 10 +++++++--- .../qml/mobilecomponents/private/ActionButton.qml | 20 ++++++++++++++++++-- 2 files changed, 25 insertions(+), 5 deletions(-) (limited to 'qt-mobile/qml') diff --git a/qt-mobile/qml/mobilecomponents/GlobalDrawer.qml b/qt-mobile/qml/mobilecomponents/GlobalDrawer.qml index 363042505..638222ada 100644 --- a/qt-mobile/qml/mobilecomponents/GlobalDrawer.qml +++ b/qt-mobile/qml/mobilecomponents/GlobalDrawer.qml @@ -84,7 +84,7 @@ OverlayDrawer { anchors { left: parent.left top: parent.top - margins: Units.smallSpacing + margins: Units.smallSpacing * 2 } Icon { id: headingIcon @@ -140,6 +140,8 @@ OverlayDrawer { model: actions property int level: 0 + interactive: contentHeight > height + footer: ListItem { visible: level > 0 enabled: true @@ -149,7 +151,8 @@ OverlayDrawer { left: parent.left } Icon { - Layout.maximumWidth: height + Layout.minimumWidth: height + Layout.maximumWidth: Layout.minimumWidth Layout.fillHeight: true source: "go-previous" } @@ -179,7 +182,8 @@ OverlayDrawer { text: modelData.text } Icon { - Layout.maximumWidth: height + Layout.minimumWidth: height + Layout.maximumWidth: Layout.minimumWidth Layout.fillHeight: true source: "go-next" visible: modelData.children != undefined diff --git a/qt-mobile/qml/mobilecomponents/private/ActionButton.qml b/qt-mobile/qml/mobilecomponents/private/ActionButton.qml index bfc8c5875..4dbea98b8 100644 --- a/qt-mobile/qml/mobilecomponents/private/ActionButton.qml +++ b/qt-mobile/qml/mobilecomponents/private/ActionButton.qml @@ -35,6 +35,15 @@ MouseArea { minimumX: contextDrawer ? 0 : parent.width/2 - width/2 maximumX: globalDrawer ? parent.width : parent.width/2 - width/2 } + function toggle() { + showAnimation.running = false; + if (transform[0].y < button.height) { + showAnimation.to = button.height; + } else { + showAnimation.to = 0; + } + showAnimation.running = true; + } transform: Translate {} onReleased: { @@ -88,6 +97,13 @@ MouseArea { } } + NumberAnimation { + id: showAnimation + target: button.transform[0] + properties: "y" + duration: Units.longDuration + easing.type: Easing.InOutQuad + } Item { id: background anchors { @@ -140,8 +156,8 @@ MouseArea { DropShadow { anchors.fill: background horizontalOffset: 0 - verticalOffset: Units.smallSpacing/2 - radius: Units.gridUnit / 2.4 + verticalOffset: Units.smallSpacing/3 + radius: Units.gridUnit / 3.5 samples: 16 color: button.pressed ? "transparent" : Qt.rgba(0, 0, 0, 0.5) source: background -- cgit v1.2.3-70-g09d2