Skip to content

feat: transient overlay scrollbar with hover expansion and fade animation#94

Open
jpnurmi wants to merge 1 commit into
am-will:mainfrom
jpnurmi:feat/transient-scrollbars
Open

feat: transient overlay scrollbar with hover expansion and fade animation#94
jpnurmi wants to merge 1 commit into
am-will:mainfrom
jpnurmi:feat/transient-scrollbars

Conversation

@jpnurmi

@jpnurmi jpnurmi commented May 31, 2026

Copy link
Copy Markdown

Replace the basic sidebar scrollbar with an overlay scrollbar inspired by Ghostty/Adwaita. The scrollbar sits overlaid at the right edge of the terminal surface and:

  • Starts hidden, fades in on scroll activity
  • Fades out after 1.5 s of inactivity via a generation-counter timer
  • Shows a 3 px thin thumb that expands to 8 px on hover, with a translucent bar background
  • Uses transparent border on the slider (background-clip: padding-box) for a wider hit target without increasing visual width
  • Stays visible while hovered; the enter handler increments the generation counter to invalidate any pending hide timer
  • Replaces set_opacity/add_remove_css_class so CSS transitions animate the fade

The scrollbar is moved from a sibling in a GtkBox to an overlay child in the terminal GtkOverlay so it paints on top of terminal content.

Before

scrollbar-before.mp4

After

scrollbar-after.mp4

…tion

Replace the basic sidebar scrollbar with an overlay scrollbar inspired by
Ghostty/Adwaita. The scrollbar sits overlaid at the right edge of the
terminal surface and:

- Starts hidden, fades in on scroll activity
- Fades out after 1.5 s of inactivity via a generation-counter timer
- Shows a 3 px thin thumb that expands to 8 px on hover, with a
  translucent bar background
- Uses transparent border on the slider (background-clip: padding-box)
  for a wider hit target without increasing visual width
- Stays visible while hovered; the enter handler increments the
  generation counter to invalidate any pending hide timer
- Replaces set_opacity/add_remove_css_class so CSS transitions
  animate the fade

The scrollbar is moved from a sibling in a GtkBox to an overlay child
in the terminal GtkOverlay so it paints on top of terminal content.
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.

1 participant