diff options
author | meta-androcto <meta.androcto1@gmail.com> | 2019-08-20 04:19:06 +0300 |
---|---|---|
committer | meta-androcto <meta.androcto1@gmail.com> | 2019-08-20 04:19:06 +0300 |
commit | 04580d6c7397e370cc72e7575d1c93f188cdd061 (patch) | |
tree | 90032396980058a1f9255bed1ba70de6203445ca /object_scatter | |
parent | 2f23e77e11cd90c33d648ed427ac7b8e5d286a37 (diff) |
object_scatter/operator: Use ui_scale + dpi : D5455
Diffstat (limited to 'object_scatter')
-rw-r--r-- | object_scatter/operator.py | 3 |
1 files changed, 2 insertions, 1 deletions
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) |