GtkScrolledWindow AUTOMATIC scrollbar behavior for EXTERNAL scrollbar

Hi, I’m trying to implement a breadcrumbs view for an application that browses trees which may be ludicrously deeply nested, so I need horizontal scrolling for the breadcrumbs. I tried it first with GtkScrolledWindow, but found that the horizontal scrollbar stealing space from the already very short horizontal GtkListView looked bad.
So I thought I’d try to move the scrollbar into an overlay child on a GtkOverlay for the main tree browser, which works, but I no longer get the nice behavior that GtkScrolledWindow’s AUTOMATIC policy gives where the scrollbar disappears when unneeded and collapses when not being hovered over.

Is there a way to get this behavior on an external GtkScrollbar? Or a way to have GtkScrolledWindow place the scrollbar outside of the content that is being scrolled?

Just to make sure, have you tried setting the overlay-scrolling property of GtkScrolledWindow to false?

I tried turning it off, but it looks like that gets rid of the behavior that I want. I want to have the small version of the scrollbar that expands when you hover over it, but I want to have that outside of the scrolled window instead of inside it.


I had a similar issue a few years ago, I ended up dropping the scrollbar entirely (i.e. EXTERNAL) and instead used left/right arrows overlays for scrolling, a little bit like what’s done in tabs headers.

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