fix bad left aligned text when zoomed out.

also minor change to cylinder_project_exec() - delay getting the MTFace.
This commit is contained in:
2013-01-03 15:52:31 +00:00
parent e0869db01f
commit c03d1270c8
2 changed files with 7 additions and 5 deletions

View File

@@ -1324,11 +1324,13 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB
/* icons default draw 0.8f x height */
rect->xmin += (int)(0.8f * BLI_rcti_size_y(rect));
if (but->editstr || (but->flag & UI_TEXT_LEFT))
rect->xmin += 0.4f * U.widget_unit;
if (but->editstr || (but->flag & UI_TEXT_LEFT)) {
rect->xmin += (0.4f * U.widget_unit) / but->block->aspect;
}
}
else if ((but->flag & UI_TEXT_LEFT)) {
rect->xmin += (0.4f * U.widget_unit) / but->block->aspect;
}
else if ((but->flag & UI_TEXT_LEFT))
rect->xmin += 0.4f * U.widget_unit;
/* always draw text for textbutton cursor */
widget_draw_text(fstyle, wcol, but, rect);