Skip to content

virtual rows: a scroll moves the pixels of what nothing floats over; only the covered bands repaint - #67

Merged
trissim merged 1 commit into
mainfrom
scroll-around-overlays
Nov 18, 2026
Merged

trissim merged 1 commit into
mainfrom
scroll-around-overlays

Conversation

@trissim

@trissim trissim commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Qt scrolls a viewport by moving its pixels and painting only the strip that came into view, unless a sibling widget overlaps what it scrolls. Then it repaints the whole viewport.

Toad's history floats three widgets over its rows: a pinned header, an overlay scrollbar and a jump button. So every frame of an arrival glide repainted every visible row's rich text. Toad's arrival drive measured this as 100% of the viewport repainted per frame at 120 Hz, which a phone can't keep up with (Tristan, Pixel 8a, 2026-11-18: "messages coming in is still stuttery, not 120fps").

Change

VirtualRowView.scrollContentsBy scrolls, by its pixels, the largest rectangle of the viewport that none of its visible floating children covers (floating_over, uncovered), and repaints only the covered bands. With nothing floating over the viewport, Qt's own scroll runs. QWidget.scroll(dx, dy, rect) moves no child widgets, so the floating ones stay put.

Measured (toad arrival drive, burst of 5, 120 Hz)

Median share of the viewport repainted per gliding frame:

  • Unthrottled: 5%, was 100%.
  • Phone speed: 21%, was 100%.

Test: uncovered for a header band plus a scrollbar column, no covers, and a full cover. All 8 row-view tests pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3

…only the covered bands repaint

Qt scrolls a viewport by moving its pixels and painting the strip that came into view, unless
a sibling widget overlaps what it scrolls; then it repaints the whole viewport. Toad's history
floats a pinned header, an overlay scrollbar and a jump button over its rows, so every frame of
an arrival glide repainted every visible row's rich text (measured: the whole viewport per
painted frame), which a phone cannot do at 120 Hz (Tristan, Pixel 8a, 2026-11-18).

`VirtualRowView.scrollContentsBy` scrolls the largest rectangle of the viewport that none of
its visible floating children covers (`floating_over`, `uncovered`), by its pixels, and
repaints only the covered bands; with nothing floating over it, Qt's own scroll runs. Measured
with toad's arrival drive at 120 Hz: a gliding frame repaints a median 5% of the viewport
(was 100%).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3
@trissim
trissim merged commit 7ea4f12 into main Nov 18, 2026
3 of 12 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.

1 participant