diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2019-09-13 21:40:30 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-09-21 15:13:10 -0700 |
commit | 8c0af2b1474e860e7893cabaa582fc3bf6fa2004 (patch) | |
tree | 5dcc6acb663ee4a247840e7d53a6841d50102984 /mobile-widgets/qml | |
parent | 54f48f0b37de42dd6330709d2f457891513454d3 (diff) | |
download | subsurface-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.qml | 7 |
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 |