Fix #106849: Sculpt Edit Voxel Size text too big (applies UI scale twice)
There has already been some work on the placement/size of the text displayed by the Edit Voxel Size operator (seeb65ab29310&0c98bb75cb), so it already sets up a suiting matrix in `VoxelSizeEditCustomData` > `text_mat`. This includes having called `ED_view3d_pixel_size` and this takes into account the UI resolution scale already afaict. So in order to resolve, just remove the multiplication by UI_SCALE_FAC. Fixes #106849 Pull Request: https://projects.blender.org/blender/blender/pulls/131093
This commit is contained in:
committed by
Philipp Oeser
parent
56be16b21e
commit
a0c0eefd5d
@@ -333,7 +333,8 @@ static void voxel_size_edit_draw(const bContext *C, ARegion * /*region*/, void *
|
||||
|
||||
GPU_matrix_push();
|
||||
GPU_matrix_mul(cd->text_mat);
|
||||
BLF_size(fontid, 10.0f * fstyle_points * UI_SCALE_FAC);
|
||||
/* Resolution scale is already accounted for in 'text_mat'. */
|
||||
BLF_size(fontid, 10.0f * fstyle_points);
|
||||
BLF_color3f(fontid, 1.0f, 1.0f, 1.0f);
|
||||
BLF_width_and_height(fontid, str, strdrawlen, &strwidth, &strheight);
|
||||
BLF_position(fontid, -0.5f * strwidth, -0.5f * strheight, 0.0f);
|
||||
|
||||
Reference in New Issue
Block a user