From a9b53efce6cdd7f6329794c9cd46525216b6844c Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 5 Jan 2016 23:43:05 -0800 Subject: [PATCH] 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 --- subsurface-mobile-main.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 #include @@ -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();