Fix #111017: Gap between color square and frame of box in the color ramp #111168

Closed
Philipp Oeser wants to merge 1 commits from lichtwerk/blender:111017 into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

1 Commits

Author SHA1 Message Date
Philipp Oeser 45f26d05c5 Fix #111017: Gap between color square and frame of box in the color ramp
While not a real fix, I tracked the reason down to
`ui_draw_colorband_handle_box`(in the non-filled case) somewhat
misbehaving:
- it is not the same size as the filled one
-- [1] top line is shifted a pixel up
-- [2] right line is shifter a pixel out
-- [3] top right corner pixel missing

But it even acts wrong if you substitute `ui_draw_colorband_handle_box`
with `imm_draw_box_wire_2d`.
Both only act wrong in the context of the colorband though (and are
working fine elsewhere) which is a bit weired and I could not track it
down. Of course we could counter-act by adjusting the width and height
that is passed to `ui_draw_colorband_handle_box`, but that still does
not solve the corner pixel missing.

In this case we can use a workaround though: just draw the box filled.
2023-08-16 09:57:34 +02:00