diff options
author | Vilém Duha <vilda.novak@gmail.com> | 2021-03-10 18:52:34 +0300 |
---|---|---|
committer | Vilém Duha <vilda.novak@gmail.com> | 2021-03-16 19:12:18 +0300 |
commit | a1fbcb6108dc3d434465076c93a1894421184b18 (patch) | |
tree | 1750619abfd90ad6fa70d34e80b1e0dfb1c46382 /blenderkit/ui.py | |
parent | 7164debdd6cea41807e5bdc160f05175f1a1d804 (diff) |
BlenderKit: UI cleanup - minor tweaks to UI
Diffstat (limited to 'blenderkit/ui.py')
-rw-r--r-- | blenderkit/ui.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/blenderkit/ui.py b/blenderkit/ui.py index b8e8ceac..71eb5e32 100644 --- a/blenderkit/ui.py +++ b/blenderkit/ui.py @@ -379,6 +379,7 @@ def draw_tooltip(x, y, text='', author='', img=None, gravatar=None): tsize = font_height else: fsize = font_height + if l[:4] == 'Tip:' or l[:11] == 'Please rate': tcol = textcol_strong fsize = font_height + 1 @@ -389,6 +390,7 @@ def draw_tooltip(x, y, text='', author='', img=None, gravatar=None): xtext += int(isizex / ncolumns) column_lines = 1 + i=0 for l in alines: if gravatar is not None: if column_lines == 1: @@ -397,15 +399,21 @@ def draw_tooltip(x, y, text='', author='', img=None, gravatar=None): xtext -= gsize + textmargin ytext = y - column_lines * line_height - nameline_height - ttipmargin - textmargin - isizey + texth - if i == 0: + if False:#i == 0: ytext = y - name_height + 5 - isizey + texth - textmargin elif i == len(lines) - 1: ytext = y - (nlines - 1) * line_height - nameline_height - ttipmargin * 2 - isizey + texth tcol = textcol tsize = font_height + if (i> 0 and alines[i-1][:7] == 'Author:'): + tcol = textcol_strong + fsize = font_height + 2 else: fsize = font_height - if l[:4] == 'Tip:' or l[:11] == 'Please rate': + tcol = textcol + + print (i) + if l[:4] == 'Tip:' or l[:11] == 'Please rate' : tcol = textcol_strong fsize = font_height + 1 |