Example of GtkHeaderBar application using glade 3.20 and python

preview_player
Показать описание
It was simple to add a GtkHeaderBar using glade 3.19. However, I did not found a pure clicking way to do the same in glade 3.20 ; but you can do as follow:

You need to create the GtkHeaderBar apart, and after activating the “client side decoration” property, close the project. Then, by editing the XML file, put the header bar section into the titlebar section, instead of the placeholder xml tag. When you reopen the glade project, that's it!
Рекомендации по теме
Комментарии
Автор

Merci pour ce tuto. La clef pour ajouter une HeaderBar en mode graphique avec Glade, c'est de veiller à ce que la fenêtre soit du type GtkApplicationWindow. Ensuite, je procède ainsi : je définis une GtkHeaderBar que je dépose tout d'abord en dehors de la fenêtre. Ensuite, je repasse sur la fenêtre, et j'active la propriété CSD (dessin par le client). Cela fait apparaître un petit espace en haut de la fenêtre. Il ne reste plus ensuite qu'à glisser-déposer la GtkHeaderBar qui était en réserve sur ce petit espace. Et voilà ! Je pense qu'il doit même être possible de faire plus simple. Bonne suite.

jlmtps
welcome to shbcf.ru