Problem with widget background-image and GtkStack
Submitted by David Shea
Link to original bug (#748256)
Description
Created attachment 302083 test application
In anaconda, we use a GtkStack to arrange the various hub and spoke panes. The panes are custom widget types. Each of these custom widgets contains a GtkEventBox in the top part of the widget, with the style class "nav-box" added to it. The spoke widgets apply a background image to the event box, using css such as:
AnacondaSpoke .nav-box { background-image: url('/path/to/background'); ...
The hub widgets do not apply any background. The problem is that the background either does not appear at all, on any of the widgets, or it appears on all of the widgets. I do not think this is a css selector problem, since when I open the inspector with any given widget visible, the issue fixes itself (i.e., the background disappears if a hub is displayed with a background, or the background is drawn if a spoke is displayed with no background).
I will attach a small test application that hopefully demonstrates this problem. It defines three types, TestappBasePane, and TestappSpokePane and TestappHubPane which both are child types of TestappBasePane. main.c creates a stack and applies the background style to the nav-box in TestappSpokePane. When I run the app, the first thing that is displayed is a TestappHubPane with a background over the nav-box. When I open the inspector and select the GtkEventBox, the background disappears.
Attachment 302083, "test application":
testapp-background.tar.gz
Version: 3.16.x