diff --git a/VERSION.info b/VERSION.info new file mode 100644 index 0000000..9f9f47c --- /dev/null +++ b/VERSION.info @@ -0,0 +1 @@ +0.1-alpha \ No newline at end of file diff --git a/aboutdialog.py b/aboutdialog.py index 781a741..4cb17b8 100644 --- a/aboutdialog.py +++ b/aboutdialog.py @@ -5,6 +5,7 @@ from PyQt6.QtGui import QFont, QPixmap from PyQt6.QtWidgets import * from label import Label +from vbox import VBox class AboutDialog(QDialog): @@ -21,12 +22,16 @@ class AboutDialog(QDialog): heading_app_name.setAlignment(Qt.AlignmentFlag.AlignLeft) heading_app_name.setFont(QFont("default", 25)) heading_app_name.setTextInteractionFlags(Qt.TextInteractionFlag.TextSelectableByMouse) + + version = QLabel(self.tr("Version: {0}".format(self._version()))) + version.setAlignment(Qt.AlignmentFlag.AlignLeft) + app_icon = QLabel() app_icon.setPixmap(QPixmap("icon7.png")) heading = QWidget(self) hbox = QHBoxLayout(heading) hbox.addWidget(app_icon) - hbox.addWidget(heading_app_name) + hbox.addWidget(VBox(heading_app_name, version)) hbox.addSpacerItem(QSpacerItem(1, 1, hPolicy=QSizePolicy.Policy.Expanding)) heading.layout = hbox @@ -38,6 +43,11 @@ class AboutDialog(QDialog): self.layout.addWidget(tabs) + buttons = QDialogButtonBox(self) + buttons.setStandardButtons(QDialogButtonBox.StandardButton.Ok) + buttons.accepted.connect(self.close) + self.layout.addWidget(buttons) + def _about(self) -> QWidget: result = QWidget() result.layout = QVBoxLayout(result) @@ -53,7 +63,14 @@ class AboutDialog(QDialog): result.layout = QVBoxLayout(result) result.layout.addWidget(Label(self.tr(textwrap.dedent("""