Skip to content

Add scrollbar for desktop devices#4620

Open
xkello wants to merge 1 commit into
masterfrom
feature/add-scrollbar-for-desktop-lists
Open

Add scrollbar for desktop devices#4620
xkello wants to merge 1 commit into
masterfrom
feature/add-scrollbar-for-desktop-lists

Conversation

@xkello

@xkello xkello commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a proper scrollbar for desktop builds. Mobile builds rely on touch/flick scrolling and never had or needed a visible scrollbar, but on desktop there was no scroll indicator at all, and once turned on in ScrollView it was drawn over the left side of content instead of reserving space for itself. ListView based lists had no scrollbar handling at all, so the same content-overlap problem applied there too, across many pages.

Fixes: #4127
Original PR: #4145

Problem

The obvious first approach was to just declare ScrollBar.vertical directly on the shared MMListView component, since ListView/Flickable auto-positions an attached scrollbar correctly on its own. The problem is that a ListView's scrollbar is drawn as an overlay on top of its content - Flickable has no concept of padding the way a Control does, so there's nothing built in to reserve space for it.

In practice, that meant every delegate, header, footer, and section-delegate across the ~17 different lists in the app would need to know a scrollbar might be there and manually subtract its width from their own sizing to avoid being drawn underneath it. That's a lot of duplicated logic to keep in sync, easy to miss in a new or existing list, and it still didn't cover every case cleanly (e.g. footers/section headers don't automatically inherit a delegate's width-adjustment logic, so each one needed the same fix repeated separately). Wrapping each list in MMScrollView instead moves that reservation into one real padding value on a Control, so no list, delegate, or header needs to know a scrollbar exists at all.

What changed

  • Added rightPadding to the shared MMScrollView component so the scrollbar reserves its own space instead of overlapping content, headers, footers, etc.
  • Wrapped every ListView in the app (via the shared MMListView component) in MMScrollView, rather than handling scrollbars per-list. ScrollView is able to reuse a ListView as its own scrollable content directly, so this didn't require a rewrite of any list, just a wrapper, and now every list in the app shares the exact same scrollbar behavior and styling from one place instead of duplicating it.
  • The scrollbar now only appears on desktop builds. Mobile keeps its normal touch/flick scrolling untouched - only the visible scrollbar and its reserved padding are suppressed there.

Behaviour

Desktop - scrollbar visible, correctly positioned on the right edge, content no longer drawn underneath it:

image image

Desktop - scrollbar hides and shows as needed:

Screencast.From.2026-07-22.18-38-09.webm

Mobile — no scrollbar shown, touch scrolling behaves exactly as before:

Screenshot_20260722-183046 Screenshot_20260722-183117

@xkello xkello added this to the 2026.4.0 milestone Jul 22, 2026
@xkello
xkello requested review from Withalion and tomasMizera July 22, 2026 16:49
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.

Add scrollbar for desktop builds in lists

1 participant