What is the current way of making linked-style toggle buttons

Basically title. I am using C, with GTK 4 and LibAdwaita, and I am want to get the appearance for grouped GtkToggleButtons where they appear to be visually “linked.” For example: the ones in the Gnome Settings “mouse” panel, the ones that select whether the primary mouse button is left or right. I’m having trouble finding it in the documentation.

I have already grouped the toggle buttons, and I also tried gtk_widget_add_css_class(foo, “linked”), where foo is the toggle button, and I applied it to each of the grouped buttons. I thought that should apply the libadwaita linked style to it, but it didn’t work. If someone could point me in the right direction, I’d really appreciate it.

And, if you need to see any actual code from the project, I can totally get that for you.

Also if this truly is in the documentation and I am just too blind to see it, I’m sorry about that.

Thank you in advance for your time.

Adw – 1: Style Classes it’s applied to the container, not buttons.

I knew it was something simple I was missing. Thanks for the answer.

Also, unrelated, but thank you for your work on libadwaita!

1 Like

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