Align View License with Application Details

Refs #1
This commit is contained in:
2026-11-26 22:46:18 -06:00
parent 7f8c604acf
commit 36f6c6b57d
5 changed files with 29 additions and 11 deletions

View File

@@ -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.

2
Jenkinsfile vendored
View File

@@ -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 ->

View File

@@ -1 +1 @@
v0.8.5.4_beta
v0.8.6.4_beta

View File

@@ -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.*?</\1>[ \t]*\n", "", markdown)
markdown = re.sub(r"(?m)^(?:</?details>|<summary>.*</summary>|<img\b[^>\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}.")

View File

@@ -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())