[Bf-extensions-cvs] [37085aeb] master: BlenderKit: Fix a text positioning bug when scaling tooltip down.

Vilém Duha noreply at git.blender.org
Tue Jan 7 11:43:56 CET 2020


Commit: 37085aeb2f38e8a0d96252b4fa3aa942910b2ec6
Author: Vilém Duha
Date:   Sat Jan 4 00:49:17 2020 +0100
Branches: master
https://developer.blender.org/rBA37085aeb2f38e8a0d96252b4fa3aa942910b2ec6

BlenderKit: Fix a text positioning bug when scaling tooltip down.

===================================================================

M	blenderkit/ui.py

===================================================================

diff --git a/blenderkit/ui.py b/blenderkit/ui.py
index 8aa18913..12c1138b 100644
--- a/blenderkit/ui.py
+++ b/blenderkit/ui.py
@@ -388,9 +388,7 @@ def draw_tooltip(x, y, text='', author='', img=None, gravatar=None):
 
         lines = text.split('\n')
 
-        nlines = math.ceil((len(lines) - 1) / ncolumns)
         texth = line_height * nlines + nameline_height
-
         isizex = int(512 * scale * img.size[0] / max(img.size[0], img.size[1]))
         isizey = int(512 * scale * img.size[1] / max(img.size[0], img.size[1]))



More information about the Bf-extensions-cvs mailing list