[Bf-blender-cvs] [f1b48a2957b] filebrowser_redesign: Fix thumbnail border drawing off by one coordinates

Julian Eisel noreply at git.blender.org
Sun Aug 11 23:47:37 CEST 2019


Commit: f1b48a2957bbf70de2709af4e525acbea73ec48b
Author: Julian Eisel
Date:   Sun Aug 11 23:46:44 2019 +0200
Branches: filebrowser_redesign
https://developer.blender.org/rBf1b48a2957bbf70de2709af4e525acbea73ec48b

Fix thumbnail border drawing off by one coordinates

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

M	source/blender/editors/space_file/file_draw.c

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

diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index fb3d05e5adc..f2655b32e31 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -285,13 +285,13 @@ static void file_draw_preview(uiBlock *block,
     immBindBuiltinProgram(GPU_SHADER_2D_FLAT_COLOR);
     immBegin(GPU_PRIM_LINE_LOOP, 4);
     immAttr4f(col_attr, 1.0f, 1.0f, 1.0f, 0.07f);
-    immVertex2f(pos_attr, (float)xco, (float)(yco + ey));
+    immVertex2f(pos_attr, (float)xco + 1, (float)(yco + ey));
     immAttr4f(col_attr, 1.0f, 1.0f, 1.0f, 0.10f);
     immVertex2f(pos_attr, (float)(xco + ex), (float)(yco + ey));
     immAttr4f(col_attr, 0.0f, 0.0f, 0.0f, 0.15f);
-    immVertex2f(pos_attr, (float)(xco + ex), (float)yco);
+    immVertex2f(pos_attr, (float)(xco + ex), (float)yco + 1);
     immAttr4f(col_attr, 0.0f, 0.0f, 0.0f, 0.2f);
-    immVertex2f(pos_attr, (float)xco, (float)yco);
+    immVertex2f(pos_attr, (float)xco + 1, (float)yco + 1);
     immEnd();
     immUnbindProgram();
   }



More information about the Bf-blender-cvs mailing list