Buttons in PopoverMenu are background color
Steps to reproduce
- The default (light) theme is used
- You place a MenuButton inside a ListBox
- Inside the PopoverMenu is a custom item which is a button
- The button has the property has-frame=False
- The button has an icon
- You select the ListBoxRow where the MenuButton is located
- Open the PopoverMenu and now the button appears to be invisble
Here is an application that demonstrates the issue: demo.py
Sorry for not providing an example in C, I can't write it. But I hope some Python helps.
Current behavior
When the popover is show the button has the color value which is equal to the background color. This means you cannot see the button. The buttons appears when you hover over it. This only happens when the button has the property has-frame=False and the MenuButton for the popover is placed in a ListBox.
Expected outcome
The color of icon in the button is not dependent on whether has-frame is true or false.
Version information
- Gtk 4.6.3
- Fedora 36
Additional information
Note: no custom theme is used.
Here the first ListBoxRow is selected and the first button is visible.
Here the seccond ListBoxRow is selected and the first button is not visible due to the color being the same as the background.
I first raised the issue on https://discourse.gnome.org/t/button-only-visible-on-hover/9827 and Sebastian pointed out that https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/theme/Default/_common.scss#L621 could be related.