From 26d2187fa6fed0e5c79c8c2b3d4b61addb2f05d6 Mon Sep 17 00:00:00 2001 From: "Jeison Yehuda Amihud (Blender Dumbass)" Date: Thu, 17 Dec 2020 06:33:55 +0000 Subject: [PATCH] Upload files to 'UI' --- UI/UI_elements.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/UI/UI_elements.py b/UI/UI_elements.py index d97eecb..7d53621 100644 --- a/UI/UI_elements.py +++ b/UI/UI_elements.py @@ -228,8 +228,8 @@ def image(layer, win ,path, x, y, width=0, height=0, fit="crop", cell=0): win.images[cell][path] = "LOADING-IMAGE" - if win.imageload < 10: - win.imageload += 1 + if win.imageload < 1: # This needs to be fixed. Because multithreading + win.imageload += 1 # gives tons of errors when loading single images. def loadimage(layer, win ,path, x, y, width, height, fit): # Loading the image into the cairo. @@ -253,6 +253,7 @@ def image(layer, win ,path, x, y, width=0, height=0, fit="crop", cell=0): else: load1 = GdkPixbuf.Pixbuf.new_from_file("settings/themes/"\ +win.settings["Theme"]+"/icons/blender.png") + os.remove("/tmp/vcstudio_blender_thumbnail"+part+".png") @@ -741,13 +742,14 @@ def text(outlayer, win, name, x, y, width, height, set_text="", parse=False, fil # So here we draw the cursor if editable: UI_color.set(layer, win, "node_blendfile") - if win.text[name]["cursor"][0] == win.text[name]["cursor"][1]: - layer.rectangle( - win.text[name]["cursor"][0]*12+5 +offsetX, - 5, - (win.text[name]["cursor"][1]*12)-(win.text[name]["cursor"][0]*12)+2, - 30 - ) + if win.text[name]["cursor"][0] == win.text[name]["cursor"][1]: + if win.blink: + layer.rectangle( + win.text[name]["cursor"][0]*12+5 +offsetX, + 5, + (win.text[name]["cursor"][1]*12)-(win.text[name]["cursor"][0]*12)+2, + 30 + ) else: roundrect(layer, win, win.text[name]["cursor"][0]*12+5 +offsetX,