GNOME Bugzilla – Bug 693227
Incorrect size allocation with overflow
Last modified: 2013-12-09 13:40:01 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);
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.
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
Commit : c5b6a2e0b671ec3f933dc033e168b67868d9fc96
(In reply to comment #3) > Commit : c5b6a2e0b671ec3f933dc033e168b67868d9fc96 Made a mistake, right commit is: 713e798419ef7d97964e07708bb9bd800caf909e