From 8c0af2b1474e860e7893cabaa582fc3bf6fa2004 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 13 Sep 2019 21:40:30 +0200 Subject: 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 --- mobile-widgets/qml/main.qml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mobile-widgets') 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 -- cgit v1.2.3-70-g09d2