Overlay widget is on top of contents but translucent?

i’m using a GtkOverlay to position a widget on top of another one. Unexpectedly to me, the overlay is on top of the child widget (as i wanted), but translucent: i can see the child widget through it.

I wanted it to be opaque (and interactive=can-target).

I currently have roughly this hierarchy:
GtkBox
\ GtkBox
\ AdwToastOverlay
\ GtkOverlay
\ GtkScrolledWindow
\ contents…
\ SearchBar <— on top of the scrolled window as expected, but see-through
\ GtkBox
\ GtkSearchEntry
\ GtkButton
\ GtkButton

At first I thought the overlay was under the contents, but now i think they’re on top, but without any background.

If that helps, this is a gtkrs4 app, here is the commit in which I’m trying to add the overlay and the overlay widget:

so it seems to be adwaita styling. if i set the style class “view” or “background” on the widget to be overlayed, it’s no longer translucent.

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