Smooth scroll for Label?

Maybe this question is naive, but I can’t find anything in the GTK widgets documentation, just some attempts on stackoverflow, that maybe even not actual for these days.

Please advice how to make smooth scroll simply, could Libadwaita contain some build-in tools or specific text widgets for this task?

What does “smooth scroll for label” mean?

I mean vertical scroll animation for the large text, that useful for reading pages in browser, because currently it’s jumping to the new vertical position immediately on every mouse wheel step

it’s not critical but all browsers have this animation feature with same ‘smooth scroll’ name

You’re looking for interpolated scrolling with mouse wheels. It’s currently not implemented in GTK: Interpolate scrolling when performed with low resolution mouse wheel devices (#702) · Issues · GNOME / gtk · GitLab

1 Like

As a side note: if you end up with enough text inside a GtkLabel as to cause scrolling in a scrolled window widget, you’re doing something impressively wrong and awful, and you should stop.

If you have a fair amount of text, you should use a GtkTextView, not a GtkLabel.

1 Like

Yes, I think about GtkTextView replacement, thanks

Just lazy to learn yet how to implement pango links there and bit strange to use editor area for read-only content (because it has context menu with edit features)

Maybe you know any specific library/extension for text rendering, like libadwaita pretty useful for tabs widget, comparing to the Notebook

I see this feature available in GNOME browser (Epiphany), interesting, it’s a part of libadwaita extensions?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.