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 333632 - use GtkMenu::scroll-arrow-height instead of MENU_SCROLL_ARROW_HEIGHT
use GtkMenu::scroll-arrow-height instead of MENU_SCROLL_ARROW_HEIGHT
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-03-06 16:24 UTC by Tim Janik
Modified: 2006-05-10 14:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
this patch implements the GtkMenu::scroll-arrow-height style property. (15.91 KB, patch)
2006-03-06 16:26 UTC, Tim Janik
none Details | Review

Description Tim Janik 2006-03-06 16:24:54 UTC
for better themability, MENU_SCROLL_ARROW_HEIGHT should be turned into a variable style property: GtkMenu::scroll-arrow-height.
Comment 1 Tim Janik 2006-03-06 16:26:32 UTC
Created attachment 60766 [details] [review]
this patch implements the GtkMenu::scroll-arrow-height style property.
Comment 2 Matthias Clasen 2006-03-07 18:26:48 UTC
Looks fine to me.
Comment 3 Michael Natterer 2006-03-24 14:46:54 UTC
I just uploaded an attachment to bug #325282 which adds an
arrow-size property, which is a GtkRequisition.

I don't think arrows should be considered to be always square,
paint_arrow() takes width/height parameters, and it's just the
default theme that always makes them having the same shape,
regardless of width/height ratio.

A theme engine may well choose to fill the passed rectangle
so the theme designer can specify arrow tips with angles != 45°
Comment 4 Matthias Clasen 2006-03-24 21:49:13 UTC
But that patch adds a notebook style property. Are you arguing that GtkMenu should
also have a GtkRequisition property, or that they should share a property ?
Comment 5 Michael Natterer 2006-03-27 11:17:37 UTC
No, I'm arguing that they should both use either an integer property
specifying one dimension, or both a GtkRequisition property.
Comment 6 Tim Janik 2006-03-28 12:10:27 UTC
to be absolutely correct and flexible theming wise, you actually need to add 4 GtkRequisitions. one for each arrow direction (up, down, left, right).
just adding one GtkRequisition and assuming that themes with non-square arrows will simply want width/height of the requisition flipped feels wrong to me.

however, i think adding 4 requisition types is overkill, related to the feature requests we have gotten from theme authors so far. for both the gtkmenu and the gtknotebook case, we really only need one requested dimension per arrow, because the scroll arrows are hardly going to be wider than the menu items or wider/higher than the notebook tab labels.
that's why, until some theme author seriously requests multiple requisitions for the scroll arrows and makes a case for them, i think we should simply go with one scroll arrow requisition like my patch does. i.e. the gtknotebook patch should then be adapted accordingly.
i agree that both widgets should be using the same style proeprty though, what about moving/calling it GtkWidget::scroll-arrow-size (int)?
Comment 7 Tim Janik 2006-05-10 14:05:27 UTC
patch is applied to HEAD now, using GtkWidget::scroll-arrow-vlength for the arrow size as discussed in bug 325282.