Incorrect handling of page navigation buttons in Gtk::Assistant after the first window close

Hello all! Faced a problem in gtkmm4. Using the Gtk::Assistant widget, according to the manual from the official documentation, an assistant is created with navigation buttons. After closing the Assistant window for the first time and then reopening it without re-creating an instance of this class, the page navigation buttons are positioned incorrectly. I am attaching a screenshot. I would be happy to help =)

[image]


Is this the assistant example in the gtkmm tutorial?

When I run the latest version of gtk, gtkmm and gtkmm-documentation, it looks different.
The navigation buttons are located in the headerbar at the top of the window.

Which version of gtk do you use? Note that gtk is more important than gtkmm.
I’ve tested on Ubuntu 23.04.

Hello! this is an example using the constructor without passing a true parameter to it, to use the header bar.

I’m using gtk4. I tested on alt linux 10.

I modified the Assistant example by adding Gtk::Assistant(false) in the constructor
in examples/book/assistant/exampleassistant.cc. Like your screenshots show, the page
navigation buttons on the assistant’s first page are right-justified only the first time.

As expected, a gtk4 example without gtkmm4 behaves identically. If you’d like to test,
see the gtk test case at tests/testassistant.c · main · GNOME / gtk · GitLab
You can replace one of the calls to gtk_assistant_new() by

assistant = g_object_new (GTK_TYPE_ASSISTANT, "use-header-bar", FALSE, NULL);      

This test example in gtk3 behaves better. The buttons are right-justified each time.

kjellahl, thanks! You helped me! Good luck to you!

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