Search code examples
gladegnome-3

How to use the GtkHeaderBar in glade 3.20?


I tried to do a GtkHeaderBar application with glade 3.20, but I have the oldschool bar on top every time, when creating my python app.

In glade 3.19, checking the client-side decoration property created a line on top, in which I could put the GtkHeaderBar. This is not the case in the latest version.

I tried to check/uncheck every property, I could not find the way to do this. That is very surprising, since this should be the default way to do a Gnome application.

I looked on the internet, but there is dramatically no documentation on glade…

After searching, it seems that I must add a GtkHeaderBar as child in the main window. But how, that is the mystery.


Solution

  • Create the window, set the "Client side window decorations" property to True. Next, get the HeaderBar widget from the toolbox and drop it on the top part of the window that just appeared:

    GtkHeaderBar in Glade

    And here you are, the header bar:

    GtkHeaderBar example