fix(ui): assistant takes the page's own colours and name; collapsed rail stops sliding
The panel still said "Trợ lý App". I reported that name as changed several turns ago — I had added help_agent.badge for the launcher pill and never touched help_agent.title, so the panel header kept the old name in all three languages. It is "AI Assistant" now, as the audit page names it. Colours were invented rather than read. docs/ui-audit.html draws the assistant in a fixed teal — .fab background #E6F6F4, border #7FD0C4, .spark #0F9B8A, pill text #0F6E62 — and the app was using the theme accent instead. The dot, the hover pill, the edge tab and the sparkle now use those values, so the floating assistant is one recognisable object rather than something that changes colour with the theme. The panel header also shows the sparkle instead of the app's own icon.png, which is what made the header look unrelated to the dot that opens it. Collapsed rail: the nav tree kept sizing its column to the widest label, so at 54px it was ~100px wide inside a 66px viewport and grew a horizontal scrollbar — which slid the icons off the x they hold while the rail is open. The column now stretches to the viewport and horizontal scrolling is off; the first item's x is 0 in both states, measured. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -448,6 +448,13 @@ class MainWindow(QMainWindow):
|
||||
tree.setIndentation(0)
|
||||
tree.setRootIsDecorated(False)
|
||||
tree.setUniformRowHeights(True)
|
||||
# The column follows the viewport instead of the widest label. Left
|
||||
# to size itself it stayed ~100px wide inside the 54px collapsed
|
||||
# rail, so a horizontal scrollbar appeared and slid the icons out of
|
||||
# the position they hold while the rail is open.
|
||||
from PySide6.QtWidgets import QHeaderView
|
||||
tree.header().setSectionResizeMode(0, QHeaderView.Stretch)
|
||||
tree.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||
return tree
|
||||
|
||||
def _nav_rows(self):
|
||||
|
||||
Reference in New Issue
Block a user