Added menu in header for orientation of manipulator widgets.

Also slightly tweaked threshold for drawing text in menu buttons. The text
was clipped just too quick.
This commit is contained in:
Ton Roosendaal
2005-04-28 17:04:08 +00:00
parent 73f88ae286
commit 8b99bfb173
2 changed files with 3 additions and 1 deletions

View File

@@ -4011,6 +4011,8 @@ void view3d_buttons(void)
xco+= XIC;
uiDefIconButS(block, TOG|BIT|2, B_MAN_SCALE, ICON_MAN_SCALE, xco,0,XIC,YIC, &G.vd->twtype, 1.0, 0.0, 0, 0, "Scale widget mode (CTRL click cycles)");
xco+= XIC;
uiDefButS(block, MENU, REDRAWVIEW3D, "Orientation%t|Global%x0|Local%x1|Normal%x2", xco,0,60,YIC, &G.vd->twmode, 0, 0, 0, 0, "Current color");
xco+= 60;
}
uiBlockEndAlign(block);
xco+= 8;

View File

@@ -4182,7 +4182,7 @@ void ui_check_but(uiBut *but)
if(but->drawstr[0]) {
but->strwidth= but->aspect*BIF_GetStringWidth(but->font, but->drawstr, transopts);
// here should be check for less space for icon offsets...
if(but->type==MENU) okwidth -= 20;
if(but->type==MENU) okwidth -= 15;
}
else
but->strwidth= 0;