Skip to content

Commit

Permalink
Merge branch 'Development' into node-groups
Browse files Browse the repository at this point in the history
  • Loading branch information
pragma37 committed Dec 9, 2023
2 parents 8b862f2 + 5f953c5 commit 7f8a405
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions BlenderMalt/MaltNodes/MaltNodeUITools.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def draw_modal_interface(operator: 'OT_MaltCycleSubCategories') -> None:
batch.draw(shader)
gpu.state.blend_set('NONE')

blf.size(font_id, label_style.points * zoom, 72)
blf.size(font_id, label_style.points * zoom)
blf.color(font_id, 1,1,1,1)

for i, e in enumerate(reversed(prev_enums)):
Expand Down Expand Up @@ -559,10 +559,10 @@ def context_path_ui_callback():
text = ' > '.join(x.node_tree.name for x in path)
preferences = context.preferences
ui_scale = preferences.view.ui_scale
dpi = preferences.system.dpi
size = preferences.ui_styles[0].widget.points * ui_scale
color = preferences.themes[0].node_editor.space.text
blf.size(font_id, size, dpi)
dpi = preferences.system.dpi
blf.size(font_id, size * (dpi / 72.0))
blf.position(font_id, 10, 10, 0)
blf.color(font_id, *color, 1)
blf.draw(font_id, text)
Expand Down Expand Up @@ -594,7 +594,7 @@ def tree_preview_ui_callback():
color = (Vector(socket.draw_color(context, node)) + Vector((1,1,1,1))) * 0.5

def draw_text(text: str, size: float, loc: tuple[float, float], color: tuple[float, float, float, float]):
blf.size(font_id, size, 72)
blf.size(font_id, size)
blf.position(font_id, *loc, 0)
blf.color(font_id, *color)
blf.draw(font_id, text)
Expand Down

0 comments on commit 7f8a405

Please sign in to comment.