From 1c1fb069f7f3bae5946c485ef48846c150ef1d54 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 21 Oct 2026 10:09:46 +0200 Subject: Detail panes: navigation as a button on top, reflowed descriptions Open in Hints and Open in Packages were plain links at the end of the pane, below the fold on a long one. ui.nav_button() makes them buttons, first in the pane; the UI guideline now says navigation buttons. The Repository description drops slack-desc's 70-column breaks. Co-Authored-By: Claude Opus 5.5 --- sb_builder/packages.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'sb_builder/packages.py') diff --git a/sb_builder/packages.py b/sb_builder/packages.py index a3d7126..dbbbd30 100644 --- a/sb_builder/packages.py +++ b/sb_builder/packages.py @@ -27,7 +27,7 @@ from PyQt6.QtWidgets import (QHBoxLayout, QLabel, QMessageBox, QScrollArea, QSpl from . import hints as hintlib from .dashboard import STATUS from .fmt import NA, fmt_time -from .ui import SP, action, chip, enable, group_label, search_field +from .ui import SP, action, chip, enable, group_label, nav_button, search_field OVERLAYS = ("personal", "pentesting") STATUSES = ("ok", "failed", "never", "outdated", "newer") @@ -303,14 +303,11 @@ class PackagesTab(QWidget): alignment=Qt.AlignmentFlag.AlignTop) self.detail.setTextInteractionFlags(Qt.TextInteractionFlag.TextSelectableByMouse) self.detail.setContentsMargins(12, 8, 12, 8) - # navigation, not an action: a link in the pane (UI guidelines) - self.open_hint_btn = QLabel('Open in Hints') - self.open_hint_btn.setContentsMargins(12, 0, 12, 8) - self.open_hint_btn.linkActivated.connect(lambda _l: self.hints_requested.emit(self.current()["name"])) + self.open_hint_btn = nav_button("Open in Hints", lambda: self.hints_requested.emit(self.current()["name"])) pane = QWidget() pane_layout = QVBoxLayout(pane) + pane_layout.addWidget(self.open_hint_btn, alignment=Qt.AlignmentFlag.AlignLeft) pane_layout.addWidget(self.detail) - pane_layout.addWidget(self.open_hint_btn) pane_layout.addStretch() scroll = QScrollArea(widgetResizable=True) scroll.setWidget(pane) -- cgit v1.2.3