Skip to content

fix(ui): always show scrollbars in full, with an overlay option (SE-296) - #199

Merged
Lionear merged 2 commits into
developfrom
fix/SE-296-always-visible-scrollbars
Sep 29, 2026
Merged

Lionear merged 2 commits into
developfrom
fix/SE-296-always-visible-scrollbars

Conversation

@Lionear

@Lionear Lionear commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

Fixes SE-296. Scrollbars used to be Fluent's auto-hiding overlay: a thin line that only widens into a grabbable bar after you hover it for a moment. Now they're always drawn in full, app-wide. A new preference, Appearance › Overlay scrollbars (off by default), brings the old look back, live.

Change

Styles/Theme.axaml owns the default through one token, SEScrollBarAutoHide (False), which two styles read as a DynamicResource:

  • ScrollViewer { AllowAutoHide }: standalone ScrollViewers, the SQL editor (AvaloniaEdit), dialogs and plugin views built in code.
  • :is(ItemsControl), TextBox, DataGrid { ScrollViewer.AllowAutoHide }: these controls pass their attached value on to the scrollbars in their own template. DataGrid draws its own scrollbars. ListBox, TreeView and TextBox template-bind their inner ScrollViewer, and a template binding beats the ScrollViewer style, so without this they kept overlay bars. That includes the connection tree and the multi-line text fields. The first commit missed these; the second one fixes it.

The preference is AppSettings.OverlayScrollbars. ThemeApplier.ApplyScrollbars writes it to Application.Resources, at startup and on Apply. I tried adding and removing a Style at runtime first: switching back left the affected ScrollViewers on the removed style's value, so this uses a resource override instead.

I also removed a comment in PluginChangelogWindow that assumed overlay scrollbars.

Verification

Checked with headless renders (DataTray.Screenshots, query/hero scenes, light and dark), inspecting each ScrollViewer and ScrollBar:

before after (default)
Editor ScrollViewer AllowAutoHide=True, bar collapsed, content under the bar (941px) False, expanded, content beside it (925px)
Result grid True, collapsed False, expanded
TreeView / ListBox / TextBox inner ScrollViewers True False

Live toggle, in one process: default, then overlay on (every ScrollViewer True, bars collapsed), then off again (back to False, expanded). The Appearance page renders the new "3. Scrollbars" section, and the settings search finds it on "scrollbar", "scrollbalk" and "overlay".

The update dialog's release notes still wrap beside the bar, not under it.

What headless can't show: the hover delay itself. A synthetic drag on the thumb scrolls in both old and new builds. Please check it with a real mouse: dragging should work straight away, without a hover first.

Notes

  • FirstRunWindow and DatabasePropertiesView keep a small right margin that was there to clear the overlay bar. With a solid bar it just adds a few pixels of gap. I left it.
  • Build clean, all test projects green, resx key counts equal (740/740), changelog fragment SE-296.changed.md (--check OK).

…rlays

Fluent's auto-hide scrollbar is a thin line that only expands into a
grabbable bar after a hover delay, so a quick drag often missed it.
Auto-hide is now driven by one SEScrollBarAutoHide resource, which the
preference overrides live. Swapping a Style in and out left ScrollViewers
on the removed style's value.

Also covers ListBox, TreeView and TextBox: their templates bind the inner
ScrollViewer to their own attached AllowAutoHide, which beat the
ScrollViewer style, so they had kept overlay scrollbars.
@Lionear Lionear changed the title fix(ui): always show scrollbars in full (SE-296) fix(ui): always show scrollbars in full, with an overlay option (SE-296) Sep 29, 2026
@Lionear
Lionear merged commit ff9adaf into develop Sep 29, 2026
2 checks passed
@Lionear
Lionear deleted the fix/SE-296-always-visible-scrollbars branch September 29, 2026 13:17
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