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:
authorDominik Fill <dominikfill>2022-05-30 20:19:07 +0300
committerLeon Schittek <leon.schittek@gmx.net>2022-05-30 20:26:03 +0300
commitf523fb1dc9bb9228820620648752ea69e4936379 (patch)
treec24ebfb1ac6b50f093c7776c73dd3211a612b151 /source/blender/editors/space_node/node_draw.cc
parentb24e091c5a99388a584568271ddf3d3b2f1f4388 (diff)
Fix T96157: Make size of Frame Node label independent from Line Width
This commits corrects the calculation of the Frame Node label size, making it independent of the 'Line Width' user preference. Since `U.dpi` is actually DPI divided by `U.pixelsize` and `U.pixelsize` is calculated from line-width multiplying by `U.pixelsize` undoes the connection between line-width and label size. It now stays the same, regardless of the line-width setting. Reviewed By: Julian Eisel, Harley Acheson Differential Revision: https://developer.blender.org/D14338
Diffstat (limited to 'source/blender/editors/space_node/node_draw.cc')
-rw-r--r--source/blender/editors/space_node/node_draw.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc
index 4d194dfbd38..e0ff4212a94 100644
--- a/source/blender/editors/space_node/node_draw.cc
+++ b/source/blender/editors/space_node/node_draw.cc
@@ -2654,7 +2654,7 @@ static void frame_node_draw_label(const bNodeTree &ntree,
BLF_enable(fontid, BLF_ASPECT);
BLF_aspect(fontid, aspect, aspect, 1.0f);
/* clamp otherwise it can suck up a LOT of memory */
- BLF_size(fontid, MIN2(24.0f, font_size), U.dpi);
+ BLF_size(fontid, MIN2(24.0f, font_size) * U.pixelsize, U.dpi);
/* title color */
int color_id = node_get_colorid(node);