[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51615] trunk/blender/source/blender/ editors/interface/interface_widgets.c: Bugfix #32962
Ton Roosendaal
ton at blender.org
Thu Oct 25 12:51:06 CEST 2012
Revision: 51615
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51615
Author: ton
Date: 2012-10-25 10:51:03 +0000 (Thu, 25 Oct 2012)
Log Message:
-----------
Bugfix #32962
Menu buttons: the text label in a button was clipped on right too soon, there's
more space. Noticable especially on popup buttons with labels like "X" or "Y".
Modified Paths:
--------------
trunk/blender/source/blender/editors/interface/interface_widgets.c
Modified: trunk/blender/source/blender/editors/interface/interface_widgets.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_widgets.c 2012-10-25 10:42:09 UTC (rev 51614)
+++ trunk/blender/source/blender/editors/interface/interface_widgets.c 2012-10-25 10:51:03 UTC (rev 51615)
@@ -572,12 +572,12 @@
/* center position and size */
centx = rect->xmax - 0.5f * BLI_rcti_size_y(rect);
centy = rect->ymin + 0.5f * BLI_rcti_size_y(rect);
- size = 0.4f * BLI_rcti_size_y(rect);
+ size = 0.4f * (float)BLI_rcti_size_y(rect);
/* XXX exception */
asp = ((float)BLI_rcti_size_x(rect)) / ((float)BLI_rcti_size_y(rect));
if (asp > 1.2f && asp < 2.6f)
- centx = rect->xmax - 0.3f * BLI_rcti_size_y(rect);
+ centx = rect->xmax - 0.4f * (float)BLI_rcti_size_y(rect);
for (a = 0; a < 6; a++) {
tria->vec[a][0] = size * menu_tria_vert[a][0] + centx;
@@ -2662,8 +2662,8 @@
widgetbase_draw(&wtb, wcol);
- /* text space */
- rect->xmax -= BLI_rcti_size_y(rect);
+ /* text space, arrows are about 0.6 height of button */
+ rect->xmax -= (6*BLI_rcti_size_y(rect))/10;
}
static void widget_menuiconbut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
More information about the Bf-blender-cvs
mailing list