Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2012-10-25 14:51:03 +0400
committerTon Roosendaal <ton@blender.org>2012-10-25 14:51:03 +0400
commit7cf6786f31a3530f58fe0b42a859565beeb7cabf (patch)
tree9430197c5fed0b33752e8201760faf2f791ad466
parent73f5944ebcbf87121a7d44e4c7fae87cfed79cef (diff)
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".
-rw-r--r--source/blender/editors/interface/interface_widgets.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index e79c311c3ee..39d90de91d8 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -572,12 +572,12 @@ static void widget_menu_trias(uiWidgetTrias *tria, rcti *rect)
/* 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 @@ static void widget_menubut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state),
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)