summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Sebastian Kügler <sebas@kde.org>2015-12-08 02:32:03 +0100
committerGravatar Sebastian Kügler <sebas@kde.org>2015-12-08 04:55:56 +0100
commit44fd9bff6776de3a7b66e8b33412a554551c50c3 (patch)
tree08bb00645c69fe4683cfbb4f9593bb479ad02d24
parent946cc5fec2bc17e1a31856571e1715c0d22230a8 (diff)
downloadsubsurface-44fd9bff6776de3a7b66e8b33412a554551c50c3.tar.gz
sync with mobilecomponents f4d5d19fc
- Kills a warning in ContextDrawer. - Improves sizing of menu icons. - Fixes icon rendering in menues. Signed-off-by: Sebastian Kügler <sebas@kde.org>
-rw-r--r--qt-mobile/qml/mobilecomponents/ContextDrawer.qml3
-rw-r--r--qt-mobile/qml/mobilecomponents/GlobalDrawer.qml2
-rw-r--r--qt-mobile/qml/mobilecomponents/Icon.qml7
-rw-r--r--qt-mobile/qml/mobilecomponents/Page.qml2
4 files changed, 10 insertions, 4 deletions
diff --git a/qt-mobile/qml/mobilecomponents/ContextDrawer.qml b/qt-mobile/qml/mobilecomponents/ContextDrawer.qml
index 07de5b88d..aea4a5ca5 100644
--- a/qt-mobile/qml/mobilecomponents/ContextDrawer.qml
+++ b/qt-mobile/qml/mobilecomponents/ContextDrawer.qml
@@ -37,6 +37,9 @@ OverlayDrawer {
id: menu
interactive: contentHeight > height
model: {
+ if (typeof root.actions == "undefined") {
+ return null;
+ }
if (root.actions.length == 0) {
return null;
} else {
diff --git a/qt-mobile/qml/mobilecomponents/GlobalDrawer.qml b/qt-mobile/qml/mobilecomponents/GlobalDrawer.qml
index 1632da122..ff379b093 100644
--- a/qt-mobile/qml/mobilecomponents/GlobalDrawer.qml
+++ b/qt-mobile/qml/mobilecomponents/GlobalDrawer.qml
@@ -146,7 +146,7 @@ OverlayDrawer {
visible: level > 0
enabled: true
RowLayout {
- height: implicitHeight + Units.smallSpacing * 2
+ height: Units.iconSizes.smallMedium + Units.smallSpacing * 2
anchors {
left: parent.left
}
diff --git a/qt-mobile/qml/mobilecomponents/Icon.qml b/qt-mobile/qml/mobilecomponents/Icon.qml
index b28624dbf..59cfaf054 100644
--- a/qt-mobile/qml/mobilecomponents/Icon.qml
+++ b/qt-mobile/qml/mobilecomponents/Icon.qml
@@ -27,13 +27,16 @@ Item {
property alias smooth: image.smooth
property bool active: false
property bool valid: image.status == Image.Ready
- implicitWidth: Math.min(image.sourceSize.width, Units.iconSizes.medium)
- implicitHeight: Math.min(image.sourceSize.height, Units.iconSizes.medium)
+
+ implicitWidth: image.source != "" ? Units.iconSizes.smallMedium : 0
+ implicitHeight: image.source != "" ? Units.iconSizes.smallMedium : 0
Image {
id: image
anchors.fill: parent
source: root.source != "" ? (root.source.indexOf(".") === -1 ? "icons/" + root.source + ".svg" : root.source) : root.source
+ sourceSize.width: root.width
+ sourceSize.height: root.height
}
GammaAdjust {
anchors.fill: image
diff --git a/qt-mobile/qml/mobilecomponents/Page.qml b/qt-mobile/qml/mobilecomponents/Page.qml
index 784ce8037..f55c24faa 100644
--- a/qt-mobile/qml/mobilecomponents/Page.qml
+++ b/qt-mobile/qml/mobilecomponents/Page.qml
@@ -57,7 +57,7 @@ Rectangle {
Connections {
target: flickable
- property real oldContentY: flickable.contentY
+ 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)));