[Bf-extensions-cvs] [04580d6c] master: object_scatter/operator: Use ui_scale + dpi : D5455
meta-androcto
noreply at git.blender.org
Tue Aug 20 03:25:34 CEST 2019
Commit: 04580d6c7397e370cc72e7575d1c93f188cdd061
Author: meta-androcto
Date: Tue Aug 20 11:19:06 2019 +1000
Branches: master
https://developer.blender.org/rBA04580d6c7397e370cc72e7575d1c93f188cdd061
object_scatter/operator: Use ui_scale + dpi : D5455
===================================================================
M object_scatter/operator.py
===================================================================
diff --git a/object_scatter/operator.py b/object_scatter/operator.py
index dbb277fe..5294d173 100644
--- a/object_scatter/operator.py
+++ b/object_scatter/operator.py
@@ -392,8 +392,9 @@ def create_line_strip_batch(coords):
def draw_text(location, text, size=15, color=(1, 1, 1, 1)):
font_id = 0
+ ui_scale = bpy.context.preferences.system.ui_scale
blf.position(font_id, *location)
- blf.size(font_id, size, 72)
+ blf.size(font_id, round(size * ui_scale), bpy.context.preferences.system.dpi)
blf.draw(font_id, text)
More information about the Bf-extensions-cvs
mailing list