[Bf-blender-cvs] [6eb096d80aa] soc-2020-outliner: Outliner: Fix wrong offset for row highlights

Nathan Craddock noreply at git.blender.org
Tue Jul 28 00:12:30 CEST 2020


Commit: 6eb096d80aa91892f7b707410edb28396038f233
Author: Nathan Craddock
Date:   Mon Jul 27 16:11:56 2020 -0600
Branches: soc-2020-outliner
https://developer.blender.org/rB6eb096d80aa91892f7b707410edb28396038f233

Outliner: Fix wrong offset for row highlights

The row highlight on the right was slightly cut off.

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

M	source/blender/editors/space_outliner/outliner_draw.c

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

diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index f5ccbd3433a..aab4db3eca6 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -3584,8 +3584,13 @@ static void draw_line_highlight(int x, int y, int maxx, int maxy, const float co
 {
   const float pad = U.pixelsize;
   UI_draw_roundbox_corner_set(UI_CNR_ALL);
-  UI_draw_roundbox_aa(
-      true, (float)x + pad, (float)y + pad, (float)maxx - pad, (float)maxy - pad, 5.0f, color);
+  UI_draw_roundbox_aa(true,
+                      (float)x + pad,
+                      (float)y + pad,
+                      (float)maxx - (pad * 2), /* Extra offset needed on right. */
+                      (float)maxy - pad,
+                      5.0f,
+                      color);
 }
 
 static void outliner_draw_highlights_recursive(const ARegion *region,



More information about the Bf-blender-cvs mailing list