GTK3 Issue: Unable to fetch color for disabled widget



Hello,

 

I am facing an issue to read foreground color for insensitive widgets (e.g. menubar, spinner etc.) in GTK 3.

I am trying to get the stylecontext for the widget by calling ‘gtk_widget_get_style_context’ API and

then get the foreground color for insensitive state by calling ‘gtk_style_context_get_color’ API.

 

The returned color value is having 0.2396 for red, green and blue component which is wrong.

 

I am using Ubuntu 22.04 and theme is ‘Yaru’.

 

Can anyone help me out what should be the correct approach to read color values from gtk css file?

 

Thanks

Abhishek

 

 

 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]