-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change default metric system based on user locale #7472
Change default metric system based on user locale #7472
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic seems correct. Whether someone in the UK wants temperature in Fahrenheit is another matter.
@stefandunca If you rebase this again master I can merge it. |
@stefandunca Sorry for taking so long. Can you fix the merge conflict? |
Other than that this all looks fine. |
@stefandunca What about this one? |
Force the US to grow up I say :-) |
Taking into consideration all the opinions the best way is to have user confirm/choose at first time run. |
Makes a lot of sense. |
@stefandunca Any update on this? |
d820a7e
to
5a9aaac
Compare
@DonLakeFlyer I did the proposed changes. Can you please have a look? |
Can you move the firstTimeStart setting to AppSettings and make it a normal setting. This provides custom build override capability as well which is important. Also it would be good to make that value be an int instead of a bool. That way you can version first time start requirements. For example, this pull just asks for units, that would be v1 and marked as 1. Then after this goes through I"m going to add asking the user about what firmware type and vehicle type they normally use QGC with. That would be a v2 first time start which could then check for a 2 in settings. If it's not 2 and only 1 then it pops first time again since there is new information required. |
Crap, sorry. After all that I forgot this part: |
5a9aaac
to
6c07163
Compare
I made the change. However, I think that private handling of the maximum size would be better done based on the context of the content and not as a general implementation. It would be good to have a minimal supported |
How exactly? Not possible as far as I can see with just a bool. When I want to add support for first time display of firmware/vehicle type how do I do it?
I don't understand what you are saying here. You don't know the available real estate until run time. You need to handle it somehow. I thought that in the previous implementation the popup would end up just being clipped. Was I wrong, did it already handle unknown sizing? |
@stefandunca I'm in the process of creating a standard mechanism for popup dialogs in QGC. This will handle things like buttons and scrolling automatically. So after this goes in I'd probably just convert this dialog to that as well. Also if you want I can handle the first start settings thing. Since I'm going to be the one that needs to add the new next first time start thing. Given those two things I can merge this now. And I'll take care of the rest. Let me know what you want to do. |
|
Set the default metric system based on user preferences. Use the user locale settings to decide between imperial and metric. If user changes any of the metric units to other value that takes precedence and it is used instead.
Give user the chance to accept or change the metric system at the first start using a generic first-time setup wizard that can be extended in the custom build by overriding QGCCorePlugin::startupPages() in order to provide other required first time setup experience e.g.: internet services login.
Changing the metric system will prompt user to restart QGC as it is in the settings.
Previously, the default metric system, if it was never changed in general settings, was set to metric system.