Skip to content

st/icon: Peek custom style properties from button parent

Florian Müllner requested to merge fmuellner/gnome-shell:more-icon-name into main

The new StButton:icon-name property turned out a bit less convenient than imagined when icon-specific style properties (like icon-size) are needed:

In that case we either have to apply a style class to the button's child, or use CSS constructs like .my-button StIcon {}. Neither are outright terrible, but take away from the convenience.

Address this by looking up custom properties in the parent node if they aren't defined for the icon itself and its parent is a button.

Merge request reports