After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 693227 - Incorrect size allocation with overflow
Incorrect size allocation with overflow
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkToolbar
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-02-05 21:27 UTC by tpgww
Modified: 2013-12-09 13:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (5.00 KB, patch)
2013-07-31 14:52 UTC, Jonh Wendell
committed Details | Review

Description tpgww 2013-02-05 21:27:16 UTC
For a toolbar in context where available allocation is variable (such as a dock), when the bar's overflow menu is enabled, the bar is entirely 'over' i.e. only the overflow button is shown.

The source file includes this comment:
 /* There is no point requesting space for the arrow if that would take
  * up more space than all the items combined
  */
Indeed, if they only require very small size, there's no need for an overflow.
However, that's not what the code does.

The problem is fixed by (for gtk 3.6.4):

--- gtktoolbar.c	2013-01-07 21:50:05.000000000 +1100
+++ gtktoolbar.c	2013-02-06 08:05:36.272999997 +1100
@@ -1011,7 +1011,7 @@
-      long_req = MIN (long_req, pack_front_size);
+      long_req = MAX (long_req, pack_front_size);
Comment 1 Jonh Wendell 2013-07-31 14:52:57 UTC
Created attachment 250552 [details] [review]
proposed patch

in this patch I implement minimum and natural sizes in get_preferred_[width,height].

this leaves to the caller the responsibility of provide the space needed for the toolbar with or not the arrow.
Comment 2 Kévin THIERRY 2013-10-31 16:59:11 UTC
An example and more info :
https://bugzilla.redhat.com/show_bug.cgi?id=988003
http://redmine.yorba.org/issues/7289

I tested both patches (for gtk+ and shotwell) and they work fine. 

Note that both of them are needed to test this bug with shotwell.

gtk+ patch : attached on this page
shotwell patch : http://redmine.yorba.org/issues/7289
Comment 3 Kévin THIERRY 2013-11-14 14:35:23 UTC
Commit : c5b6a2e0b671ec3f933dc033e168b67868d9fc96
Comment 4 Kévin THIERRY 2013-12-09 13:40:01 UTC
(In reply to comment #3)
> Commit : c5b6a2e0b671ec3f933dc033e168b67868d9fc96

Made a mistake, right commit is: 713e798419ef7d97964e07708bb9bd800caf909e