25 lines
576 B
Python
25 lines
576 B
Python
from typing import Callable
|
|
|
|
from PyQt6.QtGui import QFont
|
|
|
|
|
|
class Settings():
|
|
|
|
def __init__(self, callback_update_ui: Callable[[], None]):
|
|
self.callback_update_ui = callback_update_ui
|
|
self.font_size(12)
|
|
|
|
@staticmethod
|
|
def max_line_length():
|
|
return 4096
|
|
|
|
def font(self) -> QFont:
|
|
return self._font
|
|
|
|
def get_font_size(self) -> int:
|
|
return self._font_size
|
|
|
|
def font_size(self, font_size: int):
|
|
self._font_size = font_size
|
|
self._font = QFont("monospace", font_size)
|
|
self.callback_update_ui() |