Search code examples
cwebkitgtk3

How can I set an entrybox in the middle and filling the titlebar between buttons


I wanted to make an easy web browser. For that I need the entrybox to be in the middle of my header bar and filling the holse space up.

The entry box is in the middle of the bar but not filling the space between the buttons.

gtk_header_bar_set_custom_title(GTK_HEADER(w->header), w->entry);

The problem is I have two buttons on the left and 3 buttons on the right. The entrybox is in the middle of the hole bar but not filling the spce between the buttons. I also don't know if there is another function for this or if I used the wrong funktion.


Solution

  • This, however, may not work on older GTK+-3 versions due to this bug: https://bugzilla.gnome.org/show_bug.cgi?id=724332

    But still try this out: gtk_widget_set_hexpand(w->entry, TRUE);