Gtk4.15 how to set css style to dropdown control

Gtk4.15 how to set css style to dropdown control

gtk4img2->dropdownFilter = gtk_drop_down_new(G_LIST_MODEL(gtk_string_list_new(dropdownlist/*(const char* []) { "Linear", "Nearest", "Trilinear", NULL }*/)), NULL);
        

I give style string:
#dropdown1 {”
“background-image: radial-gradient(at bottom right, transparent, white);”
“background-color: #F0F0F0;”
“}”
but none effect。
Please help me。Thanks。

I had solved it now.

Hi xingyun86,

I would like to set dropdown control styles too. Please could you say how you solved the problem?

Cheers,
Pat

you can use gtk_widget_get_first_child to enum child control, set each css style.

Thanks - that’s what I thought. :slight_smile: