GNOME Bugzilla – Bug 722542
Port the toolbar to GtkHeaderBar
Last modified: 2014-02-18 17:17:43 UTC
Right now the toolbar is infact a GtkFrame with the style "header-bar" and some margins. We want reak headerbar for some reasons: - Remove the ugly margin from the code - Full match with other apps with headerbar - The most important: support the "decoration-layout" property (the "gtk-decoration-layout" property in GtkSettings) - I guess there is more some reasons. I was discussed with Matthias Clasen, and we had some problem with GtkHeaderBar which he fixed them - see bug 722340 and the match commit and also the following commit for the patch bar widget: https://git.gnome.org/browse/gtk+/commit/?id=7c08896
Created attachment 266651 [details] [review] path bar: Request enough natural width to fit all buttons See the same commit in gtk+: https://git.gnome.org/browse/gtk+/commit/?id=7c08896
Created attachment 266652 [details] [review] toolbar: Port to GtkHeaderBar It isn't complete. I see two problems: - The patchbar is higher than the other buttons in the headerbar - The location entry not expand (when it shown) Note: in the patch I changed the places of the buttons in the code, see the b39f094 commit im gtk+.
I've managed to make it all same height by packing the pathbar and all the individual buttons in a size group.
Created attachment 267414 [details] [review] WIP size_group (In reply to comment #3) > I've managed to make it all same height by packing the pathbar and all the > individual buttons in a size group. It is doesn't work for me.
Get rid of the extra hbox in there and set the headerbar valign to center, too
Created attachment 267574 [details] [review] toolbar: Port to GtkHeaderBar
Created attachment 268783 [details] [review] toolbar: Port to GtkHeaderBar
IMO this would be good to have for 3.12....
I think this will happen just with someone will review my patch before the freeze.
Created attachment 269244 [details] [review] Fix window dragging on the path bar GtkWindow relies on button press, release and motion notify events being propagated. Therefore, we need to select for motion notify events to make window dragging work.
Created attachment 269245 [details] [review] Fix window dragging on the path bar GtkWindow relies on button press, release and motion notify events being propagated. Therefore, we need to select for motion notify events to make window dragging work.
With this additional patch, it seems fine to me. The window dragging fix needs a recent gtk commit (8bd94a9515f0ca861a56f2f52a91a4b2b5ea96b1) to work
Attachment 266651 [details] pushed as 0e8bdf7 - path bar: Request enough natural width to fit all buttons Attachment 268783 [details] pushed as 94dc4d6 - toolbar: Port to GtkHeaderBar Attachment 269245 [details] pushed as 2fa9004 - Fix window dragging on the path bar Thanks! I pushed all these to git master.
*** Bug 724582 has been marked as a duplicate of this bug. ***
*** Bug 722385 has been marked as a duplicate of this bug. ***
*** Bug 708426 has been marked as a duplicate of this bug. ***