Broken radiobutton selection

Good afternoon to anybody!
GTK 3.24.10 had good radiobuttons.
After update I had received GTK 3.24.30
And radiobuttons became broken.
Before update there was selected radiobutton with black dot inside.
After update there is no good black dot inside of selected radio and it has now parasitic unnecessary blue selection.
How can I style my radiobuttons to get an old look?
rb
I have prepared a snippet for my program. What style do I need to fit here?

     #ifdef FOR_WINDOWS
        Glib::RefPtr<Gtk::CssProvider> css_provider2;
        css_provider2 = Gtk::CssProvider::create();
        css_provider2->load_from_data( "W_H_A_T ?");   
        get_style_context()->add_provider_for_screen(Gdk::Screen::get_default() , css_provider2, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
        #endif

So… your problem is just a change in the theme?

As Timm says, its a change in the theme. You can use a different theme if you don’t like the way it looks now.

The CSS selectors for GtkCheckButton are documented in the API reference; you can look at the style properties applied to a check button using the Inspector.

I doubt it very much. I ran an experiment. After the upgrade, I still have a backup copy of the files. I took only one libgtk-3-0.dll from backup and replaced it. And then the updated system with all the new files but the old libgtk-3-0.dll showed me the old good radio buttons.

Perhaps styling my buttons can compensate for the regressive changes in libgtk 3.24.30. It seems that I have no choice but to manipulate the styles anyway.
But what exactly are the styles? What exactly prevents the icon of an enabled radio button with a dot inside from displaying, and what exactly makes it have a blue highlight, which is accepted for other widgets, but unnatural for radio buttons?

I have a hard time understanding what you even want, but the answer to all styling questions is: CSS. There is a CSS theme that GTK uses and it defines how everything looks.

Let’s admit. (Although I have already proved that the regressive changes occurred not in theme (style), or at least far from only in it.) So, what should I write in style to remove the blue selection that has suddenly appeared for some time, and return the display to its place icons with a dot, which just as suddenly ceased to be displayed?

I took only one libgtk-3-0.dll from backup and replaced it. And then the updated system with all the new files but the old libgtk-3-0.dll showed me the old good radio buttons.

Of course it’s in the theme: the theme is compiled-in in the libgtk shared library, as gresource. So when you’re actually switching back to the old shared library, you’re switching back to the old theme too. You can see it in the gtk/gen-gtk-gresources-xml.py file in GTK 4’s source code.

Thank you, this is important for my understanding.
But still, how do I make the necessary changes to the radio buttons in my program to override new built-in defaults? Maybe someone can suggest a necessary piece of style for Gtk::CssProvider? I can’t even imagine what properties need to be tormented.
(GTK3)
I only tried this: I took the file with the icon, put it next to the program and fed the following style fragment to the provider:
“radio:checked {-gtk-icon-source: url(\“radio-checked-symbolic.symbolic.png\”);}”
But the parasitic blue selection still remains, and besides, this is clearly the worst way.
I mean to make this amendment without installing and using the “external” theme entirely.

a more or less decent result was obtained in this way:
inspector2
And very thank you for GTK Inspector!
Although the dot is still more than it was in 3.24.10
But it’s possible to live with it.
PS
It is a pity that something is constantly being broken in the GTK3. Shouldn’t have done it in compiled-in theme.

Just because you don’t like the default appearance doesn’t mean it’s “broken”. The fact that you can change the appearance would demonstrate that it’s not broken at all.

2 Likes

Of course it doesn’t.
But it’s one thing if I initially didn’t like the default appearance and feel, and quite another thing when I’m suddenly must to repair it after a micro-minor update.

GTK3 will only ever see micro releases until GTK5 is out; so theme refreshes will happen there—if they happen at all.

My observation is that application developers are hoping that GTK3 can finally be used, hoping for stability and predictability. I would really like the Gnome Team to meet their expectations, and not to make such changes to GTK3, except for bug fixes.

We’re getting into philosophical territory.

The stability promise of GTK3 refers to the API, and includes the CSS selectors. There’s no explicit guarantee that everything in the default theme shipped by GTK will ever stay pixel perfect.

If you want to stick to a specific visual appearance, then you should side-load the theme you want with your application. If you want to integrate with the rest of the GTK applications on your system, you get to deal with theme refreshes.

Theme updates don’t happen often, in any case.

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