mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-13 15:57:14 +03:00
UI Scaling: Store pre-fiddling default in theme.default_ui_scale
This is in case anything needs to know the ratio between what was the default and what we then set it to.
This commit is contained in:
parent
c5518cf763
commit
1446796eb8
@ -1054,6 +1054,7 @@ if __name__ == "__main__":
|
||||
if not ui_scaling:
|
||||
ui_scaling = '0.0'
|
||||
config.set('ui_scaling', ui_scaling)
|
||||
theme.default_ui_scale = root.tk.call('tk', 'scaling')
|
||||
if ui_scaling != '0.0':
|
||||
root.tk.call('tk', 'scaling', float(ui_scaling))
|
||||
app = AppWindow(root)
|
||||
|
1
theme.py
1
theme.py
@ -115,6 +115,7 @@ class _Theme(object):
|
||||
self.widgets_pair = []
|
||||
self.defaults = {}
|
||||
self.current = {}
|
||||
self.default_ui_scale = None # None == not yet known
|
||||
|
||||
def register(self, widget):
|
||||
# Note widget and children for later application of a theme. Note if the widget has explicit fg or bg attributes.
|
||||
|
Loading…
x
Reference in New Issue
Block a user