subsurface/mobile-widgets
Dirk Hohndel cb71fb2822 mobile/UI: correctly scale UI without restart
The fact that the rescaling in the settings gave different results from
what we got after a restart really should have been a dead giveaway that
the code was fundamentally flawed.

With this, if the user picks smaller, regular, or larger they now always
get the same, consistent values for gridUnit and font sizes.

This also gives up on the idea that we can just force the gridUnit to be
smaller to make things work if the font (which drives the gridUnit) is
too big for a screen. That fundamentally cannot work and gives a
horrible UI experience. So instead simply warn the user and continue
with matching font / gridUnit, which will still give a bad experience,
but at least we told the user about it and didn't pretend this was ok or
fixable.

Finally, this gets the factors right when switching from smaller to
larger or back, without stopping at regular on the way.

One odd side effect of this code is that under certain conditions
(number of columns changes) the display window when running mobile on
desktop will resize. That's kind of odd, but as that is not /really/ our
target platform, for now I'd consider it acceptable. But it does deserve
more investigation.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-19 12:35:29 -08:00
..
3rdparty mobile/statistics: add simple icon 2021-01-10 15:16:52 -08:00
qml mobile/UI: correctly scale UI without restart 2021-01-19 12:35:29 -08:00
CMakeLists.txt statistics: add a skeleton StatsManager class 2021-01-10 15:16:52 -08:00
qmlinterface.cpp mobile/summary: remove dive summary calculation 2020-02-08 10:29:36 -08:00
qmlinterface.h mobile/summary: remove dive summary calculation 2020-02-08 10:29:36 -08:00
qmlmanager.cpp mobile: replace locationProvider with calls to GpsLocation::instance() 2021-01-02 12:47:15 -08:00
qmlmanager.h mobile: replace locationProvider with calls to GpsLocation::instance() 2021-01-02 12:47:15 -08:00
statsmanager.cpp mobile/statistics: make charts model available to UI 2021-01-13 11:39:36 -08:00
statsmanager.h mobile/statistics: make charts model available to UI 2021-01-13 11:39:36 -08:00
themeinterface.cpp mobile/UI: remember the system default font size 2021-01-19 12:35:29 -08:00
themeinterface.h mobile/UI: remember the system default font size 2021-01-19 12:35:29 -08:00