Re: Expand the child in the GtkHeaderBar

Tristan Van Berkom <[email protected]>
Newsgroups gmane.comp.gnome.gtk+.devel.general,gmane.comp.gnome.nautilus
Message-ID <CAGUy9WK3s9k7Npra-CugC_XynVR2LApVpatLX+-CojfGfcgt+Q@mail.gmail.com>
On Fri, Jul 5, 2013 at 10:55 PM, Yosef Or Boczko <[email protected]> wrote:
> Good afternoon!
>
> I wrote a program that uses in GtkHeaderBar [1].
> In the GtkHeaderBar I put a buttons (GtkButton) and also entry (GtkEntry):
> entry-without-expand.png [2]:
> |<>| |--- entry ---|                                               | X
>
> I tried to expand the entry which is in haderbar, see something like this:
> entry-with-expand-gimp-editor.png [3]:
> |<>| |--------------------- entry ---------------------| | X
>
> To expand, I tired use the following functions:
> gtk_widget_set_vexpand (entry, TRUE); /* It does nothing, not expand! */
> g_object_set (entry, "expand", TRUE, NULL); /* It also does nothing, not
> expand */
> It does not work!

Why are you using GtkHeaderBar ?

From what I understand, the main feature of GtkHeaderBar is to center
the title text in the allocation regardless of the size of any sibling
widgets which are to the left or right.

But you are not displaying a title anyway... so why not just use a
horizontal GtkBox ?

Cheers,
    -Tristan

>
> There is a way to expand the entry in headerbar?
>
> I do it so that to port the toolbar in nautilus (NautilusToolbar) to
> headerbar.
>
> [1] attached: main.c or:
> https://bitbucket.org/yoseforb/expand-header-bar/src/80a2af720bbc0ef487887d859dcf74410f786267/main.c?at=master
>
> [2] attached: entry-without-expand.png or:
> https://bitbucket.org/yoseforb/expand-header-bar/src/80a2af720bbc0ef487887d859dcf74410f786267/entry-without-expand.png?at=master
>
> [3] attached: entry-with-expand-gimp-editor.png or:
> https://bitbucket.org/yoseforb/expand-header-bar/src/80a2af720bbc0ef487887d859dcf74410f786267/entry-with-expand-gimp-editor.png?at=master
>
> Regards,
> Yosef Or Boczko
>
> _______________________________________________
> gtk-devel-list mailing list
> [email protected]
> https://mail.gnome.org/mailman/listinfo/gtk-devel-list
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.