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:
authorYevgeny Makarov <jenkm>2020-10-09 10:17:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-10-09 10:20:50 +0300
commit07bd16de5b8319b399e403e0e47c5db3ea4fcc42 (patch)
treeb815d0ce5c1b07ce01fc1664c45b3685b337985e /source/blender/editors/space_node
parent2a39b6d4d14e270029d51785617e4ddbad318e84 (diff)
UI: Fix node label overflow on high-DPI
Ref D9099
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r--source/blender/editors/space_node/node_draw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index ac2b8bac70d..bafd1b9a388 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -1275,7 +1275,7 @@ static void node_draw_basis(const bContext *C,
showname,
(int)(rct->xmin + NODE_MARGIN_X),
(int)(rct->ymax - NODE_DY),
- (short)(iconofs - rct->xmin - 18.0f),
+ (short)(iconofs - rct->xmin - (18.0f * U.dpi_fac)),
(short)NODE_DY,
NULL,
0,
@@ -1456,7 +1456,7 @@ static void node_draw_hidden(const bContext *C,
showname,
round_fl_to_int(rct->xmin + NODE_MARGIN_X),
round_fl_to_int(centy - NODE_DY * 0.5f),
- (short)(BLI_rctf_size_x(rct) - 18.0f - 12.0f),
+ (short)(BLI_rctf_size_x(rct) - ((18.0f + 12.0f) * U.dpi_fac)),
(short)NODE_DY,
NULL,
0,