Open maximized and refine toolbar layout

This commit is contained in:
lm 2025-10-19 19:59:18 +02:00
parent 36879dbb86
commit fb9d6ebee6
2 changed files with 7 additions and 3 deletions

View File

@ -51,5 +51,5 @@ def run() -> int:
defaults=DEFAULTS.copy(), defaults=DEFAULTS.copy(),
reset_exclusions=RESET_EXCLUSIONS_ON_IMAGE_CHANGE, reset_exclusions=RESET_EXCLUSIONS_ON_IMAGE_CHANGE,
) )
window.show() window.showMaximized()
return app.exec() return app.exec()

View File

@ -68,9 +68,13 @@ class ToolbarButton(QtWidgets.QPushButton):
"""Rounded toolbar button inspired by the legacy design.""" """Rounded toolbar button inspired by the legacy design."""
def __init__(self, icon_text: str, label: str, callback: Callable[[], None], parent: QtWidgets.QWidget | None = None): 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.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( self.setStyleSheet(
""" """
QPushButton { QPushButton {