GUIBRUSHR.GUI.LAYOUT.ScaleManager module¶
ScaleManager - Singleton that manages named fonts and handles responsive scaling.
When the main window is resized, all named Font objects are updated automatically, causing every widget that references them to redraw at the new size.
All configurable values (reference height, scale limits, font families, base sizes) are read from graphics.yaml via GraphicsConfig.
- class GUIBRUSHR.GUI.LAYOUT.ScaleManager.ScaleManager(root)[source]¶
Bases:
object- classmethod init(root)[source]¶
Initialize the singleton instance. Must be called once after tk.Tk() is created.
- Parameters:
root – The root tkinter Tk widget.
- Returns:
The singleton instance.
- Return type:
- classmethod get()[source]¶
Get the singleton instance.
- Returns:
The singleton instance, or None if init() has not been called.
- Return type:
ScaleManager or None
- __init__(root)[source]¶
Initialize the ScaleManager with the root tkinter widget.
- Parameters:
root – The root tkinter Tk widget used for resize event binding.
- property scale¶
The current scale factor (float).