use wheel + ctrl to change font size

This commit is contained in:
2021-10-28 09:40:40 +02:00
parent ce840819b2
commit f42ff06ce8
3 changed files with 54 additions and 16 deletions

View File

@@ -1,9 +1,12 @@
from typing import Callable
from PyQt6.QtGui import QFont
class Settings():
def __init__(self):
def __init__(self, callback_update_ui: Callable[[], None]):
self.callback_update_ui = callback_update_ui
self.font_size(12)
@staticmethod
@@ -18,4 +21,5 @@ class Settings():
def font_size(self, font_size: int):
self._font_size = font_size
self._font = QFont("monospace", font_size)
self._font = QFont("monospace", font_size)
self.callback_update_ui()