Force OSX to automatically scale the canvas on legacy settings read

As of ab83c862, the canvas scaling setting is now used on OSX
(before it was ignored). Legacy settings would have this set to 1.0,
which would not automatically scale the canvas and break on Retina
displays. OSX auto detection works well enough in wx 3.0, so we
can use it now.
This commit is contained in:
Ian McInerney 2020-06-12 19:13:43 +01:00 committed by Jon Evans
parent ad12c42e8b
commit 9d78aa604f
1 changed files with 6 additions and 0 deletions

View File

@ -223,6 +223,12 @@ bool COMMON_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
ret &= fromLegacy<int>( aCfg, "IconScale", "appearance.icon_scale" );
ret &= fromLegacy<bool>( aCfg, "UseIconsInMenus", "appearance.use_icons_in_menus" );
// Force OSX to automatically scale the canvas. Before v6, the user setting wasn't used on OSX and was
// set to 1.0. In v6, the setting is now used by OSX and should default to automatic scaling.
#ifdef __WXMAC__
( *this )[PointerFromString( "appearance.canvas_scale" )] = 0.0;
#endif
ret &= fromLegacy<bool>( aCfg, "ShowEnvVarWarningDialog", "environment.show_warning_dialog" );
auto load_env_vars = [&] () {