UI: fix misaligned popover arrow near the region edge
Differential Revision: https://developer.blender.org/D5872
This commit is contained in:
parent
f0f189de76
commit
cd9da385b0
|
@ -4914,7 +4914,9 @@ static void ui_draw_popover_back_impl(const uiWidgetColors *wcol,
|
|||
{
|
||||
/* tsk, this isn't nice. */
|
||||
const float unit_half = unit_size / 2;
|
||||
const float cent_x = mval_origin ? mval_origin[0] : BLI_rcti_cent_x(rect);
|
||||
const float cent_x = mval_origin ?
|
||||
CLAMPIS(mval_origin[0], rect->xmin + unit_size, rect->xmax - unit_size) :
|
||||
BLI_rcti_cent_x(rect);
|
||||
rect->ymax -= unit_half;
|
||||
rect->ymin += unit_half;
|
||||
|
||||
|
|
Loading…
Reference in New Issue