diff --git a/dangerzone/gui/main_window.py b/dangerzone/gui/main_window.py index ef33a0bfc..7c1405426 100644 --- a/dangerzone/gui/main_window.py +++ b/dangerzone/gui/main_window.py @@ -14,7 +14,7 @@ from .. import container, errors from ..container import convert from ..document import SAFE_EXTENSION, Document -from ..util import get_resource_path, get_subprocess_startupinfo +from ..util import get_resource_path, get_subprocess_startupinfo, get_version from .logic import Alert, DangerzoneGui log = logging.getLogger(__name__) @@ -44,11 +44,16 @@ def __init__(self, dangerzone: DangerzoneGui) -> None: header_label = QtWidgets.QLabel("dangerzone") header_label.setFont(self.dangerzone.fixed_font) header_label.setStyleSheet("QLabel { font-weight: bold; font-size: 50px; }") + header_version_label = QtWidgets.QLabel(get_version()) + header_version_label.setProperty("class", "version") # type: ignore [arg-type] + header_version_label.setAlignment(QtCore.Qt.AlignBottom) + header_layout = QtWidgets.QHBoxLayout() header_layout.addStretch() header_layout.addWidget(logo) header_layout.addSpacing(10) header_layout.addWidget(header_label) + header_layout.addWidget(header_version_label) header_layout.addStretch() # Waiting widget, replaces content widget while container runtime isn't available diff --git a/share/dangerzone.css b/share/dangerzone.css index 3684a7cac..36b8c8b19 100644 --- a/share/dangerzone.css +++ b/share/dangerzone.css @@ -22,3 +22,8 @@ QLabel[style="safe_extension_filename"] { QLabel.docs-selection { font-size: 18px; } + +QLabel.version { + font-size: 20px; + padding-bottom: 5px; /* align with 'dangerzone' font */ +}