summaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml
diff options
context:
space:
mode:
Diffstat (limited to 'qt-mobile/qml')
-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)));