UI Papercut: Fix gap in node outline

Correct corner radius of the node outline to prevent a noticeable gap in
some cases.

---

Currently we make a small mistake in the creation of the node outline:
We offset the rectangle describing the outline by the outline thickness,
but we don't adjust the corner radius accordingly.
Therefore the rounded corner of the outline and the node body are not
concentric which can sometimes lead to a visible gap at the corner.
How noticeable it is depends on the theme, the screen's dpi and the
line thickness set in the preferences.

Simply adjusting the corner radius for the outline to also be increased
by the outline thickness fixes this small issue.

| display, line thickness | **patch** | **master** |
| --- | --- | --- |
| 1080p, default/thin  | {F12835304} | {F12835305} |
| retina, thin | {F12835306} | {F12835307} |

The issue was mentioned by @hitrpr

Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D13955
This commit is contained in:
Leon Schittek 2022-01-31 12:31:07 -05:00 committed by Aaron Carlisle
parent 8ad5241778
commit 5edb924e57
1 changed files with 1 additions and 1 deletions

View File

@ -2028,7 +2028,7 @@ static void node_draw_basis(const bContext &C,
}
UI_draw_roundbox_corner_set(UI_CNR_ALL);
UI_draw_roundbox_4fv(&rect, false, BASIS_RAD, color_outline);
UI_draw_roundbox_4fv(&rect, false, BASIS_RAD + outline_width, color_outline);
}
float scale;