But, as I had a elaborate discussion with zerohour here,this is probably problem with the shell theme, as override don't solve the problem(buttons are showing color only when not in focus). This is a confirmed problem of the Adwaita theme, as I get the desired effect if I use other GTK+ themes(Like High(/Low)Contrast etc).So, any advice please?

The only issue I see is that the type is const GdkRGBA* rather than the GdkRGBA I think you are setting up in which case you probably need a & out front or a * in the declaration.Always done it more longhand myself as I guess I just feel an address should have a variable declaration on which to base itself rather than trying to inline it all. Something like the following should work:

Ah I see tadej already beat me too it with a shorter one.by the way, its the same when dealing with other _set_rgba functions such as gtk_color_selection_set_current_rgba. The gtk_widget_modify_bg function is also depreciated in gtk3 which is good because GdkColor was always a pain to use. GdkRGBA integrates naturally with cairo and will make things easier all round.

...as override don't solve the problem(buttons are showing color only when not in focus)...

I would think this would be the case no matter what the theme.As you can see gtk_widget_override_background_color takes GtkStateFlags. One being GTK_STATE_FLAG_NORMAL, another being GTK_STATE_FLAG_FOCUSED etc. In order to have a certain colour when focused I imagine you would have to call this function again with each of the GtkStateFlags you want overridden.It is possible that on certain distros the default settings may be linked so if you override one it will trickle over to others. Not too sure. I generally prefer not to touch styling /theming as this can stuff up the accessibility of a program if the user can't override it in turn.

Who is online

Users browsing this forum: Google [Bot] and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum