|
BonPrinter v1.2.0
Thermal Printer tool
|
Class to scale text and item positions. More...
Public Member Functions | |
| None | __init__ (self, "MainWindow" ui) |
| None | check_for_style_change (self, Optional[ETheme] e_style=None) |
| Check for style change. | |
| FONT | get_font (self, str s_item, Optional[float] ext_factor=None, Optional[float] x_scale_factor=None, Optional[float] y_scale_factor=None, str font=S_DEFAULT_FONT) |
| Get font size depend of scale factor. | |
| bool | is_light_theme (self) |
| get status for active light theme (or classic -> not dark). | |
| None | resize_window (self, bool b_update_only_total_font=False) |
| set position and size of items | |
| None | set_change_theme_status (self) |
| Set dialog theme style. | |
| None | set_dialog_style (self, "DIALOG | MainWindow" dialog) |
| Set dialog theme style. | |
| None | update_darkmode_status (self, ETheme e_style) |
| Update dark mode status. | |
| None | update_icons (self) |
| Update icons to change between light and dark items depend on theme state. | |
Public Attributes | |
| default_button_stylesheet = get_stylesheet(self.ui.btn_lock) | |
| default_stylesheet = get_stylesheet(self.ui) | |
| e_actual_theme = ETheme.LIGHT | |
| e_style = read_theme_settings() | |
| FONT | table_font = create_font(S_DEFAULT_FONT, D_FONT_SIZE["table"]) |
| ui = ui | |
Class to scale text and item positions.
| ui | : main window object |
Definition at line 55 of file monitor.py.
| None __init__ | ( | self, | |
| "MainWindow" | ui ) |
Definition at line 61 of file monitor.py.
| None check_for_style_change | ( | self, | |
| Optional[ETheme] | e_style = None ) |
Check for style change.
| e_style | : style to set |
Definition at line 83 of file monitor.py.
| FONT get_font | ( | self, | |
| str | s_item, | ||
| Optional[float] | ext_factor = None, | ||
| Optional[float] | x_scale_factor = None, | ||
| Optional[float] | y_scale_factor = None, | ||
| str | font = S_DEFAULT_FONT ) |
Get font size depend of scale factor.
| s_item | : item in D_FONT_SIZE with specified font size |
| ext_factor | : extended factor (for extended button view) |
| x_scale_factor | : x scale factor |
| y_scale_factor | : y scale factor |
| font | : font |
Definition at line 199 of file monitor.py.
| bool is_light_theme | ( | self | ) |
get status for active light theme (or classic -> not dark).
Definition at line 156 of file monitor.py.
| None resize_window | ( | self, | |
| bool | b_update_only_total_font = False ) |
set position and size of items
| b_update_only_total_font | : status if update only text font size |
Definition at line 223 of file monitor.py.
| None set_change_theme_status | ( | self | ) |
Set dialog theme style.
Definition at line 123 of file monitor.py.
| None set_dialog_style | ( | self, | |
| "DIALOG | MainWindow" | dialog ) |
Set dialog theme style.
| dialog | : set style to this dialog |
Definition at line 141 of file monitor.py.
| None update_darkmode_status | ( | self, | |
| ETheme | e_style ) |
Update dark mode status.
| e_style | : select theme mode |
Definition at line 108 of file monitor.py.
| None update_icons | ( | self | ) |
Update icons to change between light and dark items depend on theme state.
Definition at line 164 of file monitor.py.
| default_button_stylesheet = get_stylesheet(self.ui.btn_lock) |
Definition at line 65 of file monitor.py.
| default_stylesheet = get_stylesheet(self.ui) |
Definition at line 64 of file monitor.py.
| e_actual_theme = ETheme.LIGHT |
Definition at line 80 of file monitor.py.
| e_style = read_theme_settings() |
Definition at line 78 of file monitor.py.
| FONT table_font = create_font(S_DEFAULT_FONT, D_FONT_SIZE["table"]) |
Definition at line 63 of file monitor.py.
| ui = ui |
Definition at line 62 of file monitor.py.