fix(ui): always show scrollbars in full, with an overlay option (SE-296) - #199
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.axamlowns the default through one token,SEScrollBarAutoHide(False), which two styles read as aDynamicResource: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 theScrollViewerstyle, 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.ApplyScrollbarswrites it toApplication.Resources, at startup and on Apply. I tried adding and removing aStyleat 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
PluginChangelogWindowthat assumed overlay scrollbars.Verification
Checked with headless renders (
DataTray.Screenshots,query/heroscenes, light and dark), inspecting each ScrollViewer and ScrollBar:AllowAutoHide=True, bar collapsed, content under the bar (941px)False, expanded, content beside it (925px)True, collapsedFalse, expandedTrueFalseLive toggle, in one process: default, then overlay on (every ScrollViewer
True, bars collapsed), then off again (back toFalse, 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
FirstRunWindowandDatabasePropertiesViewkeep 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.SE-296.changed.md(--checkOK).