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:
authorHarley Acheson <harley.acheson@gmail.com>2022-09-24 03:36:49 +0300
committerHarley Acheson <harley.acheson@gmail.com>2022-09-24 03:36:49 +0300
commitcd1631b17dd0e25a8a398fb00a982ca5f0633558 (patch)
treeee8d9cdb560c815ea86d952ef2f053c6435865c1 /source/blender/editors/space_view3d
parent88a602bc64fc2a86411d67881439a04486f95030 (diff)
BLF: Refactor of DPI
Correction of U.dpi to hold actual monitor DPI. Simplify font sizing by omitting DPI as API argument, always using 72 internally. See D15961 for more details. Differential Revision: https://developer.blender.org/D15961 Reviewed by Campbell Barton
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_ruler.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c b/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c
index 73ac3f3a1d8..70afb0eaff1 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c
@@ -118,7 +118,7 @@ static void gizmo_axis_draw(const bContext *C, wmGizmo *gz)
font.id = BLF_default();
BLF_disable(font.id, BLF_ROTATION | BLF_SHADOW | BLF_MATRIX | BLF_ASPECT | BLF_WORD_WRAP);
BLF_enable(font.id, BLF_BOLD);
- BLF_size(font.id, AXIS_TEXT_SIZE, 72);
+ BLF_size(font.id, AXIS_TEXT_SIZE);
BLF_position(font.id, 0, 0, 0);
/* Calculate the inverse of the (matrix_final * matrix_offset).
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
index d95d49dd982..2f5ca79a660 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
@@ -647,7 +647,7 @@ static void gizmo_ruler_draw(const bContext *C, wmGizmo *gz)
GPU_line_width(1.0f);
BLF_enable(blf_mono_font, BLF_ROTATION);
- BLF_size(blf_mono_font, 14.0f * U.pixelsize, U.dpi);
+ BLF_size(blf_mono_font, 14.0f * U.dpi_fac);
BLF_rotation(blf_mono_font, 0.0f);
UI_GetThemeColor3ubv(TH_TEXT, color_text);