Set the icon for a button from CSS

Hi,

is it possible to the icon(-name) for a button from CSS?

Thanks
Martin

Why not use gtk_button_new_from_icon_name() ?

You can set the background image from CSS, assuming you also set a minimum width and height, but an icon is generally a UI element, not a style, so you want to set it in the same place you construct the button.

But when I use the background image I cannot use CSS to recolor the image.
I need the ability to have use defined color schemas.
And I saw that it is possible to recolor icons…
But I was not able to use an icon in a button and then recolor the icon using CSS.

So, is there a possibility to recolor the icon specify as “icon-name” property during the buton creatiion using CSS?

I’m using svg files for my custom icons…

Thanks
Martin

No, the icon name is an object property, not a CSS one.

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