aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-13 21:40:30 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-21 15:13:10 -0700
commit8c0af2b1474e860e7893cabaa582fc3bf6fa2004 (patch)
tree5dcc6acb663ee4a247840e7d53a6841d50102984 /mobile-widgets/qml
parent54f48f0b37de42dd6330709d2f457891513454d3 (diff)
downloadsubsurface-8c0af2b1474e860e7893cabaa582fc3bf6fa2004.tar.gz
Mobile: recalculate gridUnit and font size if width changes
This could happen when you rotate a mobile device, or when running Subsurface-mobile on the desktop. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r--mobile-widgets/qml/main.qml7
1 files changed, 7 insertions, 0 deletions
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml
index e5dbbbc7b..6f5412658 100644
--- a/mobile-widgets/qml/main.qml
+++ b/mobile-widgets/qml/main.qml
@@ -564,6 +564,13 @@ if you have network connectivity and want to sync your data to cloud storage."),
darkTheme()
}
}
+
+ onWidthChanged: {
+ console.log("Window width changed to " + width)
+ // we need to recalculate our base units
+ setupUnits()
+ }
+
pageStack.initialPage: DiveList {
id: diveList
opacity: 0