Fix #140403: Window Edge Cannot be Greater than Border Width

If the outer window edge is greater than the area border width then
there are unpainted pixels at the edge. This only happens if the
border width is less than 2. This PR just adds a minimum width to
ensure coverage.

Pull Request: https://projects.blender.org/blender/blender/pulls/140563
This commit is contained in:
Harley Acheson
2025-06-18 01:27:09 +02:00
committed by Harley Acheson
parent 0bcab8913f
commit 43216b03eb

View File

@@ -1814,8 +1814,8 @@ static void area_calc_totrct(const bScreen *screen, ScrArea *area, const rcti *w
/* Padding around each area, except at window edges. */
const short px = short(std::max(float(U.border_width) * UI_SCALE_FAC, UI_SCALE_FAC));
/* Padding at window edges. */
const short px_edge = int(UI_SCALE_FAC * 2.0f);
/* Padding at window edges. Cannot be less than border width. */
const short px_edge = short(std::min(UI_SCALE_FAC * 2.0f, float(U.border_width) * UI_SCALE_FAC));
area->totrct.xmin = area->v1->vec.x;
area->totrct.xmax = area->v4->vec.x;