diff --git a/EDMarketConnector.py b/EDMarketConnector.py index d79f1c8a..d08ec18d 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -1048,6 +1048,12 @@ if __name__ == "__main__": Translations.install(config.get('language') or None) # Can generate errors so wait til log set up root = tk.Tk(className=appname.lower()) + ui_scaling = config.get('ui_scaling') + if not ui_scaling: + ui_scaling = 'default' + config.set('ui_scaling', ui_scaling) + if ui_scaling != 'default': + root.tk.call('tk', 'scaling', ui_scaling) app = AppWindow(root) def messagebox_not_py3(): diff --git a/prefs.py b/prefs.py index 5a17c42a..1c6242b5 100644 --- a/prefs.py +++ b/prefs.py @@ -342,10 +342,8 @@ class PreferencesDialog(tk.Toplevel): ttk.Separator(themeframe, orient=tk.HORIZONTAL).grid(columnspan=4, padx=PADX, pady=PADY*4, sticky=tk.EW) nb.Label(themeframe, text=_('UI Scaling')).grid(row = 23, padx=PADX, pady=2*PADY, sticky=tk.W) # Select UI scaling ui_scaling = config.get('ui_scaling') - if not ui_scaling: - ui_scaling = 1.0 self.ui_scaling = tk.StringVar(value=ui_scaling) - ui_scales = ( 0.5, 1.0, 1.5, 2.0, 3.0, 4.0) + ui_scales = ( 'default', 0.5, 1.0, 1.5, 2.0, 3.0, 4.0) self.uiscale_dropdown = nb.OptionMenu(themeframe, self.ui_scaling, self.ui_scaling.get(), *ui_scales) self.uiscale_dropdown.configure(width=15) self.uiscale_dropdown.grid(row=23, column=1, sticky=tk.W) @@ -642,11 +640,12 @@ class PreferencesDialog(tk.Toplevel): config.set('language', lang_codes.get(self.lang.get()) or '') Translations.install(config.get('language') or None) + config.set('ui_scaling', self.ui_scaling.get()) + #self.tk.call('tk', 'scaling', self.ui_scaling.get()) config.set('always_ontop', self.always_ontop.get()) config.set('theme', self.theme.get()) config.set('dark_text', self.theme_colors[0]) config.set('dark_highlight', self.theme_colors[1]) - #self.tk.call('tk', 'scaling', 2.0) theme.apply(self.parent) # Notify