Search code examples
gtkgnomegladepygobject

What kind of widget is this? / How to make this widget?


I've looked through every single widget on glade trying to replicate this "box/table" style seen here on Settings:

Screenshot of Settings on Adwaita Dark and Arc Dark

But I haven't found anything like it anywhere on Glade or on the official docs :(

The closest I've come to replicating it is through a frame without a label and with separators and custom css that changes the background color to @base-color, and although it kinda works alright in some themes:

Replica with Arc Dark

In others it just plain doesn't work:

Replica with Adwaita Dark

And I'd imagine that with more elaborate or complex themes it will look even worse.

So my questions are: What is the name of this Widget shown in these pictures? And if it does not exist or is not available in Glade, is there a way to replicate it more reliably than what I've shown here?


Solution

  • It is called a GtkListBox. As you can see, it takes any other widget as a child. So you have to add rows to the ListBox and then add widgets to each row.

    Here is an example in Python.