From 36f6c6b57dc54fc735206c1643a48a543021210e Mon Sep 17 00:00:00 2001 From: Sonja M Thomas Date: Thu, 26 Nov 2026 22:46:18 -0600 Subject: [PATCH] Align View License with Application Details Refs #1 --- CHANGELOG.md | 7 +++++++ Jenkinsfile | 2 +- VERSION.md | 2 +- arm/about.py | 25 ++++++++++++++++--------- tests/windows_gui.py | 4 ++++ 5 files changed, 29 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f29ca1..9586a11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,14 @@ # Changelog +## v0.8.6.4_beta — 2026-11-26 + +- Place View License immediately beside Application Details in About. The Software license row displays DC-ANCSA v1.0 as text. View License still opens the complete terms offline. +- Include Report Issue in About and the tray, and Copy Application Information in Application Details. [#1](https://phantom.zapto.org/gitea/sonja/Adaptive_Resource_Monitor/issues/1) + ## v0.8.5.4_beta — 2026-11-26 +The Report Issue revision is included in v0.8.6.4_beta. + - Add a Report Issue button in About and a matching tray action below Check for Updates. Both open the public issue index in the default browser. [#1](https://phantom.zapto.org/gitea/sonja/Adaptive_Resource_Monitor/issues/1) - Add Copy Application Information to Application Details for an optional, sanitized clipboard summary. diff --git a/Jenkinsfile b/Jenkinsfile index 96f2f5a..460bdf0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,7 +31,7 @@ pipeline { ? bat(returnStdout: true, script: "@git diff --name-only --no-renames ${previous} ${env.ARM_SOURCE_COMMIT}").readLines().collect { it.trim() }.findAll { it } : [] def documentation = { path -> path in ['README.md', 'RELEASE_PROCESS.md', - 'CONTRIBUTING.md', 'SUPPORT.md', 'SECURITY.md', 'ISSUE_MANAGEMENT.md'] || + 'CONTRIBUTING.md', 'SUPPORT.md', 'SECURITY.md', 'ISSUE_MANAGEMENT.md', 'ROADMAP.md'] || path.startsWith('docs/screenshots/') || path.startsWith('.gitea/ISSUE_TEMPLATE/') } def documentationWorkflow = ['Jenkinsfile', 'tools/readme_release.py', 'tools/ci_release.py'] env.ARM_DOCS_ONLY = (changed.any(documentation) && changed.every { path -> diff --git a/VERSION.md b/VERSION.md index 9e5a6c6..f4ddbc2 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -v0.8.5.4_beta +v0.8.6.4_beta diff --git a/arm/about.py b/arm/about.py index 2cc581f..fd0ee1d 100644 --- a/arm/about.py +++ b/arm/about.py @@ -9,6 +9,7 @@ import json import logging import platform +import re import struct import sys import winreg @@ -136,19 +137,18 @@ class AboutPage(QWidget): self.version = QLabel(VERSION) details.addRow("Installed version", self.version) details.addRow("Release classification", QLabel(release_classification())) - license_row = QHBoxLayout() - self.view_license = QPushButton("View License") - self.view_license.clicked.connect(self.show_license) bundled = document(LICENSE_FILE).is_file() - license_row.addWidget(QLabel(LICENSE_LABEL if bundled else "License file unavailable")) - self.view_license.setEnabled(bundled) - license_row.addWidget(self.view_license) - license_row.addStretch() - details.addRow("Software license", license_row) + license_label = QLabel(LICENSE_LABEL if bundled else "License file unavailable", + textFormat=Qt.TextFormat.PlainText) + details.addRow("Software license", license_label) view = QPushButton("Application Details") view.clicked.connect(self.show_details) + self.view_license = QPushButton("View License") + self.view_license.setEnabled(bundled) + self.view_license.clicked.connect(self.show_license) buttons = QHBoxLayout() buttons.addWidget(view) + buttons.addWidget(self.view_license) self.report_issue = QPushButton(self.style().standardIcon(ISSUE_ICON), "Report Issue") self.report_issue.clicked.connect(open_issue_tracker) buttons.addWidget(self.report_issue) @@ -210,7 +210,14 @@ class AboutPage(QWidget): path = document(name) self.document_group.setTitle(self.documents[name]) try: - self.browser.setMarkdown(path.read_text(encoding="utf-8")) + markdown = path.read_text(encoding="utf-8") + if name == "README.md": + # The public README includes HTML layout and images for Gitea. + # Keep its Markdown prose and tables readable in Qt's offline viewer. + markdown = re.sub(r"(?ms)^<(div|p|table)\b.*?[ \t]*\n", "", markdown) + markdown = re.sub(r"(?m)^(?:|.*|\n]*>|)[ \t]*\n", + "", markdown) + self.browser.setMarkdown(markdown) except (OSError, UnicodeError) as exc: LOG.warning("Unable to read About document %s: %s", name, exc) self.browser.setPlainText(f"Unable to open {name}.") diff --git a/tests/windows_gui.py b/tests/windows_gui.py index aa623e3..01b7e8a 100644 --- a/tests/windows_gui.py +++ b/tests/windows_gui.py @@ -434,6 +434,10 @@ def verify_branding(session, results, captures=None): dialog.reject() QTimer.singleShot(0, inspect_details) view = next(button for button in session.about_page.findChildren(QPushButton) if button.text() == "Application Details") + license_button = session.about_page.view_license + assert license_button.y() == view.y() and license_button.height() == view.height() + assert view.geometry().right() < license_button.x() < session.about_page.report_issue.x() + results["about_license_button_row"] = True view.click() assert "Installation type" in details and "Source checkout" in details and VERSION in details info = dict(line.split(": ", 1) for line in copied[0].splitlines())