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>
This commit is contained in:
Dirk Hohndel 2019-09-13 21:40:30 +02:00
parent 54f48f0b37
commit 8c0af2b147

View file

@ -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