mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-18 09:57:40 +03:00
UI Scaling: Option added to Appearance tab of Settings
This commit is contained in:
parent
09add21a1a
commit
ea53a60596
15
prefs.py
15
prefs.py
@ -337,6 +337,20 @@ class PreferencesDialog(tk.Toplevel):
|
|||||||
self.theme_label_1.grid(row=21, padx=PADX, sticky=tk.W)
|
self.theme_label_1.grid(row=21, padx=PADX, sticky=tk.W)
|
||||||
self.theme_button_1 = nb.ColoredButton(themeframe, text=' Hutton Orbital ', background='grey4', command=lambda:self.themecolorbrowse(1)) # Do not translate
|
self.theme_button_1 = nb.ColoredButton(themeframe, text=' Hutton Orbital ', background='grey4', command=lambda:self.themecolorbrowse(1)) # Do not translate
|
||||||
self.theme_button_1.grid(row=21, column=1, padx=PADX, pady=PADY, sticky=tk.NSEW)
|
self.theme_button_1.grid(row=21, column=1, padx=PADX, pady=PADY, sticky=tk.NSEW)
|
||||||
|
|
||||||
|
# UI Scaling
|
||||||
|
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)
|
||||||
|
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)
|
||||||
|
|
||||||
|
# Always on top
|
||||||
ttk.Separator(themeframe, orient=tk.HORIZONTAL).grid(columnspan=3, padx=PADX, pady=PADY*4, sticky=tk.EW)
|
ttk.Separator(themeframe, orient=tk.HORIZONTAL).grid(columnspan=3, padx=PADX, pady=PADY*4, sticky=tk.EW)
|
||||||
self.ontop_button = nb.Checkbutton(themeframe, text=_('Always on top'), variable=self.always_ontop, command=self.themevarchanged)
|
self.ontop_button = nb.Checkbutton(themeframe, text=_('Always on top'), variable=self.always_ontop, command=self.themevarchanged)
|
||||||
self.ontop_button.grid(columnspan=3, padx=BUTTONX, sticky=tk.W) # Appearance setting
|
self.ontop_button.grid(columnspan=3, padx=BUTTONX, sticky=tk.W) # Appearance setting
|
||||||
@ -632,6 +646,7 @@ class PreferencesDialog(tk.Toplevel):
|
|||||||
config.set('theme', self.theme.get())
|
config.set('theme', self.theme.get())
|
||||||
config.set('dark_text', self.theme_colors[0])
|
config.set('dark_text', self.theme_colors[0])
|
||||||
config.set('dark_highlight', self.theme_colors[1])
|
config.set('dark_highlight', self.theme_colors[1])
|
||||||
|
#self.tk.call('tk', 'scaling', 2.0)
|
||||||
theme.apply(self.parent)
|
theme.apply(self.parent)
|
||||||
|
|
||||||
# Notify
|
# Notify
|
||||||
|
Loading…
x
Reference in New Issue
Block a user