From e0fc5268fe308d8f60ee96bb2c03c49a5fa4a524 Mon Sep 17 00:00:00 2001 From: Sebastian Kügler Date: Sun, 29 Nov 2015 22:12:49 +0100 Subject: Sync with mobilecomponents 54e4f2622a MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes loading the icon. Signed-off-by: Sebastian Kügler --- qt-mobile/qml/mobilecomponents/Icon.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'qt-mobile/qml/mobilecomponents') diff --git a/qt-mobile/qml/mobilecomponents/Icon.qml b/qt-mobile/qml/mobilecomponents/Icon.qml index d5b253235..b28624dbf 100644 --- a/qt-mobile/qml/mobilecomponents/Icon.qml +++ b/qt-mobile/qml/mobilecomponents/Icon.qml @@ -19,6 +19,7 @@ import QtQuick 2.0 import QtGraphicalEffects 1.0 +import org.kde.plasma.mobilecomponents 0.2 Item { id: root @@ -26,13 +27,13 @@ Item { property alias smooth: image.smooth property bool active: false property bool valid: image.status == Image.Ready - implicitWidth: image.sourceSize.width - implicitHeight: image.sourceSize.height + implicitWidth: Math.min(image.sourceSize.width, Units.iconSizes.medium) + implicitHeight: Math.min(image.sourceSize.height, Units.iconSizes.medium) Image { id: image anchors.fill: parent - source: root.source != "" ? "icons/" + root.source + ".svg" : root.source + source: root.source != "" ? (root.source.indexOf(".") === -1 ? "icons/" + root.source + ".svg" : root.source) : root.source } GammaAdjust { anchors.fill: image -- cgit v1.2.3-70-g09d2 From 33d589ff5cf3b7189abad40c2dd2f4f62b82c7bc Mon Sep 17 00:00:00 2001 From: Sebastian Kügler Date: Sun, 29 Nov 2015 22:17:35 +0100 Subject: Add missing icon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is the SVG file used on the drag button. Like the other two, it's taken from the Breeze icon set. Signed-off-by: Sebastian Kügler --- qt-mobile/qml/mobile-resources.qrc | 1 + .../icons/distribute-horizontal-x.svg | 102 +++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 qt-mobile/qml/mobilecomponents/icons/distribute-horizontal-x.svg (limited to 'qt-mobile/qml/mobilecomponents') diff --git a/qt-mobile/qml/mobile-resources.qrc b/qt-mobile/qml/mobile-resources.qrc index 8abdcd9d6..19c580da0 100644 --- a/qt-mobile/qml/mobile-resources.qrc +++ b/qt-mobile/qml/mobile-resources.qrc @@ -34,5 +34,6 @@ mobilecomponents/private/qmldir mobilecomponents/icons/go-next.svg mobilecomponents/icons/go-previous.svg + mobilecomponents/icons/distribute-horizontal-x.svg diff --git a/qt-mobile/qml/mobilecomponents/icons/distribute-horizontal-x.svg b/qt-mobile/qml/mobilecomponents/icons/distribute-horizontal-x.svg new file mode 100644 index 000000000..1a14480d7 --- /dev/null +++ b/qt-mobile/qml/mobilecomponents/icons/distribute-horizontal-x.svg @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + -- cgit v1.2.3-70-g09d2 From 609d138a490ed6eddfd4594775cef157f8ceaf61 Mon Sep 17 00:00:00 2001 From: Sebastian Kügler Date: Sun, 29 Nov 2015 22:24:04 +0100 Subject: sync with mobilecomponents' d3fa79b50b54 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the flickering when the drag button hits the right edge. Signed-off-by: Sebastian Kügler --- qt-mobile/qml/mobilecomponents/ApplicationWindow.qml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'qt-mobile/qml/mobilecomponents') diff --git a/qt-mobile/qml/mobilecomponents/ApplicationWindow.qml b/qt-mobile/qml/mobilecomponents/ApplicationWindow.qml index 71980f9e6..220d0524c 100644 --- a/qt-mobile/qml/mobilecomponents/ApplicationWindow.qml +++ b/qt-mobile/qml/mobilecomponents/ApplicationWindow.qml @@ -20,6 +20,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.3 import "private" +import org.kde.plasma.mobilecomponents 0.2 /** * A window that provides some basic features needed for all apps @@ -73,6 +74,9 @@ ApplicationWindow { contextDrawer.parent = contentItem.parent; } + width: Units.gridUnit * 25 + height: Units.gridUnit * 30 + property alias actionButton: __actionButton ActionButton { id: __actionButton -- cgit v1.2.3-70-g09d2 From b96f202f14ab4703057116ac1c1bba601da75a99 Mon Sep 17 00:00:00 2001 From: Sebastian Kügler Date: Sun, 29 Nov 2015 23:39:14 +0100 Subject: sync with mobilecomponents 67e73fa85e MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Colors have slightly changed in breeze. Signed-off-by: Sebastian Kügler --- qt-mobile/qml/mobilecomponents/Theme.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qt-mobile/qml/mobilecomponents') diff --git a/qt-mobile/qml/mobilecomponents/Theme.qml b/qt-mobile/qml/mobilecomponents/Theme.qml index fd8c49ba2..402caedb6 100644 --- a/qt-mobile/qml/mobilecomponents/Theme.qml +++ b/qt-mobile/qml/mobilecomponents/Theme.qml @@ -41,12 +41,12 @@ QtObject { property color visitedLinkColor: "#2196F3" property color buttonTextColor: Qt.rgba(0,0,0, 0.54) - property color buttonBackgroundColor: "#f3f3f3" + property color buttonBackgroundColor: "#eff0f1" property color buttonHoverColor: "#2196F3" property color buttonFocusColor: "#2196F3" property color viewTextColor: Qt.rgba(0,0,0, 0.54) - property color viewBackgroundColor: "#f3f3f3" + property color viewBackgroundColor: "#fcfcfc" property color viewHoverColor: "#2196F3" property color viewFocusColor: "#2196F3" -- cgit v1.2.3-70-g09d2 From 09bf7fabcfac66df6cdcfd3d55650f3d58a195d9 Mon Sep 17 00:00:00 2001 From: Sebastian Kügler Date: Mon, 30 Nov 2015 01:17:41 +0100 Subject: sync with mobilecomponents e7d789465b9a935ec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes lack of spacing in the drawer's menu items. Signed-off-by: Sebastian Kügler --- qt-mobile/qml/mobilecomponents/ContextDrawer.qml | 4 +++- qt-mobile/qml/mobilecomponents/GlobalDrawer.qml | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'qt-mobile/qml/mobilecomponents') diff --git a/qt-mobile/qml/mobilecomponents/ContextDrawer.qml b/qt-mobile/qml/mobilecomponents/ContextDrawer.qml index 2e2f95f7e..083254946 100644 --- a/qt-mobile/qml/mobilecomponents/ContextDrawer.qml +++ b/qt-mobile/qml/mobilecomponents/ContextDrawer.qml @@ -18,6 +18,7 @@ */ import QtQuick 2.1 +import QtQuick.Layouts 1.2 import QtQuick.Controls 1.0 as QtControls import org.kde.plasma.mobilecomponents 0.2 @@ -63,7 +64,8 @@ OverlayDrawer { } delegate: ListItem { enabled: true - Row { + RowLayout { + height: implicitHeight + Units.smallSpacing * 2 anchors { left: parent.left margins: Units.largeSpacing diff --git a/qt-mobile/qml/mobilecomponents/GlobalDrawer.qml b/qt-mobile/qml/mobilecomponents/GlobalDrawer.qml index 082231c41..363042505 100644 --- a/qt-mobile/qml/mobilecomponents/GlobalDrawer.qml +++ b/qt-mobile/qml/mobilecomponents/GlobalDrawer.qml @@ -49,6 +49,7 @@ OverlayDrawer { Layout.minimumHeight: Math.max(headingIcon.height, heading.height) + Units.smallSpacing*2 fillMode: Image.PreserveAspectCrop + asynchronous: true anchors { left: parent.left @@ -123,6 +124,7 @@ OverlayDrawer { Layout.maximumWidth: Layout.minimumWidth Layout.fillWidth: false Layout.fillHeight: true + visible: children.length > 0 } Item { Layout.minimumWidth: Units.smallSpacing @@ -142,6 +144,7 @@ OverlayDrawer { visible: level > 0 enabled: true RowLayout { + height: implicitHeight + Units.smallSpacing * 2 anchors { left: parent.left } @@ -151,9 +154,9 @@ OverlayDrawer { source: "go-previous" } Label { - // Weird, this doesn't work + // Weird, this doesn't work //text: (typeof(i18n) != undefined) ? i18n("Back") : "Back" - text: "Back" + text: "Back" } } onClicked: pageRow.pop() @@ -161,6 +164,7 @@ OverlayDrawer { delegate: ListItem { enabled: true RowLayout { + height: implicitHeight + Units.smallSpacing*2 anchors { left: parent.left right: parent.right -- cgit v1.2.3-70-g09d2 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/mobilecomponents') 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