summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/main.qml7
1 files changed, 5 insertions, 2 deletions
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml
index 298b746c9..1e5e1bdba 100644
--- a/mobile-widgets/qml/main.qml
+++ b/mobile-widgets/qml/main.qml
@@ -194,16 +194,19 @@ Kirigami.ApplicationWindow {
Backend.cloud_verification_status === Enums.CS_VERIFIED)
topContent: Image {
source: "qrc:/qml/icons/dive.jpg"
+ // it's a 4x3 image, but clip if it takes too much space (making sure the text fits)
+ property int myHeight: Math.min(Math.max(rootItem.height * 0.3, textblock.height + Kirigami.Units.largeSpacing), parent.width * 0.75)
Layout.fillWidth: true
+ Layout.maximumHeight: myHeight
sourceSize.width: parent.width
- fillMode: Image.PreserveAspectFit
+ fillMode: Image.PreserveAspectCrop
LinearGradient {
anchors {
left: parent.left
right: parent.right
top: parent.top
}
- height: textblock.height * 2
+ height: Math.min(textblock.height * 2, parent.myHeight)
start: Qt.point(0, 0)
end: Qt.point(0, height)
gradient: Gradient {