Skip to content

Widen AppletPanel scrollbar and add hover-reveal for accessibility#2257

Merged
ten9876 merged 2 commits intoten9876:mainfrom
M7HNF-Ian:fix/applet-scrollbar-accessibility
May 1, 2026
Merged

Widen AppletPanel scrollbar and add hover-reveal for accessibility#2257
ten9876 merged 2 commits intoten9876:mainfrom
M7HNF-Ian:fix/applet-scrollbar-accessibility

Conversation

@M7HNF-Ian
Copy link
Copy Markdown
Contributor

Summary

  • Increases applet panel scrollbar width from 6px12px, in line with the native OS default (~12–16px) that users were accustomed to before Add visible scrollbar styling to AppletPanel scroll area (#2071) #2088
  • Scrollbar is hidden until the user hovers over the right edge of the panel, then reveals the dark track and handle — works on macOS, Linux, and Windows
  • Adds :pressed state so the handle stays visible while actively dragging (previously disappeared mid-scroll)
  • Brightens the handle colour (#304050#4a6880) for better contrast against the dark track
  • Adds min-height: 20px to the handle so it never shrinks to an unclickable sliver with many applets loaded

Background

PR #2088 introduced explicit dark-theme scrollbar styling to fix macOS hiding the bar entirely. The chosen 6px width is significantly thinner than the ~12–16px native default users were accustomed to. Before #2088 there was no stylesheet applied, so the OS rendered its own full-width bar.

User feedback:

"The scroll bar on the applet panel is now very narrow. It was better before when it was wide. It's hard for us old guys with shacky hands to hit it so narrow."

The Qt stylesheet change uses standard QSS properties and should apply uniformly across macOS, Linux, and Windows, though only tested on macOS.

Files modified

  • src/gui/AppletPanel.cpp

Design note for maintainer

Width (12px), handle colour (#4a6880), and hover-reveal behaviour are open to adjustment — flagging per CLAUDE.md since this is a visual design change.

Test plan

  • Build and confirm scrollbar is hidden at rest, visible on hover
  • Confirm handle stays visible while dragging (:pressed state)
  • Confirm behaviour on Linux and Windows
  • Confirm no horizontal scrollbar appears (policy: always off)

Restores scrollbar width to 12px (matching the ~12-16px native OS default
users were accustomed to before ten9876#2088 introduced the 6px dark-theme bar).
Adds hover-reveal so the bar is hidden at rest and appears on mouse-over,
with a :pressed state to keep the handle visible during active dragging.
Copy link
Copy Markdown
Contributor

@aethersdr-agent aethersdr-agent Bot left a comment

Choose a reason for hiding this comment

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

Looks good — clean, focused QSS change that stays within scope. A few observations:

Functional concern: handle visibility on first interaction

The handle starts fully transparent and only becomes visible on :hover or :pressed. This means on touch-only devices (or pen/stylus without hover) the user has no way to discover the scrollbar exists — they can scroll via the wheel/trackpad but never see the handle. Not a blocker for this PR since the stated goal is desktop mouse accessibility, but worth noting if AetherSDR ever targets touch.

Minor QSS note

The hover-reveal triggers on QScrollBar::handle:vertical:hover — on Qt 5 this requires the mouse to land directly on the (transparent) handle, which could be tricky. On Qt 6 it works as expected because the scrollbar groove forwards hover to the handle. Since AetherSDR is Qt 6, this should be fine.

No issues found with:

  • Scope: single file, stylesheet-only, no logic changes
  • Conventions: no settings involved, no resource ownership changes
  • Platform risk: standard QSS properties, nothing platform-specific

Nice PR description and good callout about being open to colour/width tweaks. Thanks @Chaosuk97!

Maintainer feedback: the hover-reveal felt too abrupt and the
transparent track left a visible gap on the right edge of the panel
when the slider faded out.

Changes from the original PR:
- Track always visible at #0a0a14 (matches the rest of the app and
  fills the gap consistently — no transparent strip).
- Handle dim (#2a3a4a) at rest, bright (#4a6880) on hover or drag.
- 500ms delay before dimming back so quick scroll gestures don't
  flicker; re-entering during the hold cancels the timer.
- Implemented via dynamic property `active` plus an event filter on
  the QScrollBar (QSS doesn't support animated transitions).

`min-height: 20px` and the bright color are unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ten9876
Copy link
Copy Markdown
Owner

ten9876 commented May 1, 2026

Claude here — thanks Ian, great catch on the accessibility complaint and clean QSS work in the original change. The brighter handle colour and :pressed fix are both keepers.

Follow-up we pushed (94b6745)

After local testing, Jeremy felt the hover-reveal was too abrupt and that the transparent track left a visible gap on the right edge of the panel when the slider faded out. We pushed a small revision:

  • Track always visible at #0a0a14 — matches the rest of the app's scrollbar style and fills the gap consistently.
  • Handle dim (#2a3a4a) at rest, bright (#4a6880) on hover or drag — same brighter colour you chose, just gated on interaction.
  • 500ms delay before dimming back so quick scroll gestures don't flicker. Re-entering during the hold cancels the timer.

Implemented via a dynamic active property on the QScrollBar plus an event filter — Qt stylesheets don't support animated CSS-style transitions, so this is a delay-then-snap rather than a fade.

Your min-height: 20px and the brighter handle colour are unchanged. Merging once CodeQL finishes.

Thanks again for the careful work — and for flagging the design call upfront per CLAUDE.md, that made the review easy.

73, Jeremy KK7GWY & Claude (AI dev partner)

@ten9876 ten9876 merged commit 60c291b into ten9876:main May 1, 2026
5 checks passed
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