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 700779 - gtk_menu_item_draw puts the arrow too close to the border
gtk_menu_item_draw puts the arrow too close to the border
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-05-21 13:09 UTC by Xavier Claessens
Modified: 2013-05-29 12:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GtkMenuItem: Take padding into account to position submenu arrow (913 bytes, patch)
2013-05-21 13:13 UTC, Xavier Claessens
accepted-commit_now Details | Review

Description Xavier Claessens 2013-05-21 13:09:05 UTC
In the LTR case, the arrow position is computed with
arrow_x = x + w - arrow_size;
Which does not take into account the padding. IMHO it should rather be
arrow_x = x + w - arrow_size - padding.right;
and similar for the RTL case of course.

Unless I'm misunderstanding something?

This is making some themes look ugly.
Comment 1 Xavier Claessens 2013-05-21 13:10:14 UTC
Note in gtk_menu_item_size_allocate() the padding is taken into account when positioning the child.
Comment 2 Xavier Claessens 2013-05-21 13:13:06 UTC
Created attachment 244916 [details] [review]
GtkMenuItem: Take padding into account to position submenu arrow
Comment 3 Xavier Claessens 2013-05-24 12:46:03 UTC
This bug is probably related to commit a69619edbc2b36aadbff200918ea9f11885d6109.
Comment 4 Matthias Clasen 2013-05-29 12:43:13 UTC
Review of attachment 244916 [details] [review]:

looks right, indeed
Comment 5 Matthias Clasen 2013-05-29 12:43:45 UTC
Review of attachment 244916 [details] [review]:

looks right, indeed.
Can you mention the commit that you tracked down in the commit message, please ?
Comment 6 Xavier Claessens 2013-05-29 12:57:53 UTC
Thanks, pushed to both master and gtk-3-8.