@@ -33,17 +33,6 @@ void Config::load(App *app)
3333 {
3434 LOG (LOGLEVEL_ERROR) << " Config - Couldn't load config file " << filename;
3535 }
36-
37- initialize ();
38- load_recents (app);
39-
40- app->set_dimensions ({(float )_store.main_window_width , (float )_store.main_window_height });
41- app->set_position ({(float )_store.main_window_x_pos , (float )_store.main_window_y_pos });
42-
43- app->gui ()->_comlynx_visible = _store.comlynx_visisble ;
44- app->gui ()->_console_visible = _store.console_visible ;
45- app->gui ()->_sessionscontrol_visible = _store.sessionscontrol_visible ;
46- Console::get_instance ().set_log_level (_store.log_level );
4736}
4837
4938void Config::save_recents (App *app)
@@ -66,7 +55,22 @@ void Config::load_recents(App *app)
6655 }
6756}
6857
69- void Config::initialize ()
58+ void Config::initialize (App *app)
59+ {
60+ load_recents (app);
61+
62+ app->set_dimensions ({(float )_store.main_window_width , (float )_store.main_window_height });
63+ app->set_position ({(float )_store.main_window_x_pos , (float )_store.main_window_y_pos });
64+
65+ app->gui ()->_comlynx_visible = _store.comlynx_visisble ;
66+ app->gui ()->_console_visible = _store.console_visible ;
67+ app->gui ()->_sessionscontrol_visible = _store.sessionscontrol_visible ;
68+ Console::get_instance ().set_log_level (_store.log_level );
69+
70+ update_ui_settings ();
71+ }
72+
73+ void Config::update_ui_settings ()
7074{
7175 apply_theme ();
7276 // apply_font(); // https://github.com/ocornut/imgui/pull/3761
@@ -471,7 +475,7 @@ void Config::apply_font(float scale)
471475
472476 io.Fonts ->Clear ();
473477
474- int font_size = scale * 16 ;
478+ int font_size = ( store (). ui_scale > 0 ? store (). ui_scale : scale) * 16 ;
475479
476480 ImFontConfig cfg;
477481 cfg.MergeMode = true ;
0 commit comments