aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-05 23:43:05 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-05 23:43:05 -0800
commita9b53efce6cdd7f6329794c9cd46525216b6844c (patch)
tree865eb6d8cb90599f59f250dee0e54246bc12e897
parent701f91e4fed443aaa52f0199ce4a73f66c4fad74 (diff)
downloadsubsurface-a9b53efce6cdd7f6329794c9cd46525216b6844c.tar.gz
QML UI: switch UI to imperial units for users in the US
This is overly simplistic and it would be better to be able to override this in the settings, but frankly fewer settings are better and in most cases this is what the user wants. Fixes #987 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--subsurface-mobile-main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/subsurface-mobile-main.cpp b/subsurface-mobile-main.cpp
index 279255ace..df25e81dc 100644
--- a/subsurface-mobile-main.cpp
+++ b/subsurface-mobile-main.cpp
@@ -10,6 +10,7 @@
#include "subsurfacestartup.h"
#include "subsurface-core/color.h"
#include "qthelper.h"
+#include "helpers.h"
#include <QStringList>
#include <QApplication>
@@ -52,6 +53,8 @@ int main(int argc, char **argv)
git_libgit2_init();
#endif
setup_system_prefs();
+ if (uiLanguage(0).contains("-US"))
+ default_prefs.units = IMPERIAL_units;
prefs = default_prefs;
fill_profile_color();
parse_xml_init();