Skip to content

Use a small Material triangle for settings expander disclosure icon#401

Merged
gbeane merged 3 commits into
mainfrom
feature/collapsible-section-icon
Jun 19, 2026
Merged

Use a small Material triangle for settings expander disclosure icon#401
gbeane merged 3 commits into
mainfrom
feature/collapsible-section-icon

Conversation

@gbeane

@gbeane gbeane commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

The collapsible "More info" sections in the settings dialogs used QToolButton.setArrowType(), which draws the Qt style's arrow primitive — chunky and not easily sized.

This swaps it for a small Material disclosure triangle in the shared CollapsibleSection widget:

  • arrow_right when collapsed, arrow_drop_down when expanded, at 16px.
  • Uses the already-bundled qt_material_icons, which renders in the palette text color, so it follows the application theme (matching how sibling dialogs already use MaterialIcon).
  • The native arrow is removed (arrowType is now NoArrow); the toggle/resize behavior is otherwise unchanged.

Because it's the shared widget, every settings "More info" expander updates consistently.

Tests

  • Added test_collapsible_section_toggles_disclosure_icon: verifies the icon swaps on expand and reverts on collapse, and that no native arrow is drawn.
  • Settings-dialog tests pass; lint and format clean.

It's a visual tweak, so a quick look in the GUI confirms the appearance; the toggle behavior is covered by the test.

@gbeane gbeane requested a review from Copilot June 19, 2026 03:13
@gbeane gbeane self-assigned this Jun 19, 2026
@gbeane gbeane requested a review from bergsalex June 19, 2026 03:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the shared settings-dialog CollapsibleSection widget to use a small Material disclosure triangle (instead of Qt’s native arrow primitive) so expander indicators are consistently themed and appropriately sized across dialogs.

Changes:

  • Replace QToolButton.setArrowType() usage with qt_material_icons.MaterialIcon for collapsed/expanded disclosure indicators.
  • Set the disclosure icon size to 16px and swap icons on toggle.
  • Add a UI test ensuring the icon changes on expand/collapse and that no native arrow is used.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/jabs/ui/settings_dialog/collapsible_section.py Switches disclosure indicator from native arrow to Material icons and updates toggle behavior to swap icons.
tests/ui/test_settings_dialog.py Adds a regression test covering disclosure icon swapping and verifying NoArrow is used.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/jabs/ui/settings_dialog/collapsible_section.py Outdated
Comment thread src/jabs/ui/settings_dialog/collapsible_section.py
Comment thread tests/ui/test_settings_dialog.py Outdated
@gbeane gbeane merged commit 1201904 into main Jun 19, 2026
5 checks passed
@gbeane gbeane deleted the feature/collapsible-section-icon branch June 19, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants