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);

View File

@@ -1563,7 +1563,6 @@ static int cylinder_project_exec(bContext *C, wmOperator *op)
uv_map_transform(C, op, center, rotmat);
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
if (!BM_elem_flag_test(efa, BM_ELEM_SELECT))
continue;
@@ -1573,6 +1572,7 @@ static int cylinder_project_exec(bContext *C, wmOperator *op)
uv_cylinder_project(luv->uv, l->v->co, center, rotmat);
}
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
uv_map_mirror(em, efa, tf);
}