diff --git a/app/qt/app.py b/app/qt/app.py index df14acf..b5dd42d 100644 --- a/app/qt/app.py +++ b/app/qt/app.py @@ -51,5 +51,5 @@ def run() -> int: defaults=DEFAULTS.copy(), reset_exclusions=RESET_EXCLUSIONS_ON_IMAGE_CHANGE, ) - window.show() + window.showMaximized() return app.exec() diff --git a/app/qt/main_window.py b/app/qt/main_window.py index 44cc455..b7c1547 100644 --- a/app/qt/main_window.py +++ b/app/qt/main_window.py @@ -68,9 +68,13 @@ class ToolbarButton(QtWidgets.QPushButton): """Rounded toolbar button inspired by the legacy design.""" def __init__(self, icon_text: str, label: str, callback: Callable[[], None], parent: QtWidgets.QWidget | None = None): - super().__init__(f"{icon_text} {label}", parent) + text = f"{icon_text} {label}" + super().__init__(text, parent) self.setCursor(QtCore.Qt.PointingHandCursor) - self.setFixedHeight(34) + self.setFixedHeight(32) + metrics = QtGui.QFontMetrics(self.font()) + width = metrics.horizontalAdvance(text) + 28 + self.setMinimumWidth(width) self.setStyleSheet( """ QPushButton {