Toolbar: Clarify how the arrow overflow menu works
authorDaniel Boles <dboles@src.gnome.org>
Sun, 3 Sep 2017 09:41:56 +0000 (10:41 +0100)
committerDaniel Boles <dboles@src.gnome.org>
Sun, 3 Sep 2017 09:58:58 +0000 (10:58 +0100)
The fact it affects the preferred size, and only works with ToolItems
that return a menu proxy item, was unclear unless deduced from other
sources, and this led to users thinking it was broken, for example:

https://stackoverflow.com/q/44644642/2757035

https://bugzilla.gnome.org/show_bug.cgi?id=787158
https://bugzilla.gnome.org/show_bug.cgi?id=787195

gtk/gtktoolbar.c

index 80efa5132073e741597cdaeae47e185f2edd176e..7acad1486994cfbe58ef03c91a3a19cb88281ac4 100644 (file)
  * “expand” is #TRUE and the property #GtkSeparatorToolItem:draw is set to
  * #FALSE, the effect is to force all following items to the end of the toolbar.
  *
+ * By default, a toolbar can be shrunk, upon which it will add an arrow button
+ * to show an overflow menu offering access to any #GtkToolItem child that has
+ * a proxy menu item. To disable this and request enough size for all children,
+ * call gtk_toolbar_set_show_arrow() to set #GtkToolbar:show-arrow to %FALSE.
+ *
  * Creating a context menu for the toolbar can be done by connecting to
  * the #GtkToolbar::popup-context-menu signal.
  *
@@ -2980,10 +2985,11 @@ gtk_toolbar_get_relief_style (GtkToolbar *toolbar)
  * @toolbar: a #GtkToolbar
  * @show_arrow: Whether to show an overflow menu
  * 
- * Sets whether to show an overflow menu when
- * @toolbar doesn’t have room for all items on it. If %TRUE,
- * items that there are not room are available through an
- * overflow menu.
+ * Sets whether to show an overflow menu when @toolbar isn’t allocated enough
+ * size to show all of its items. If %TRUE, items which can’t fit in @toolbar,
+ * and which have a proxy menu item set by gtk_tool_item_set_proxy_menu_item()
+ * or #GtkToolItem::create-menu-proxy, will be available in an overflow menu,
+ * which can be opened by an added arrow button.
  * 
  * Since: 2.4
  **/