Merge branch 'blender-v5.0-release'
This commit is contained in:
@@ -2213,8 +2213,9 @@ void UI_update_text_styles();
|
||||
#define UI_HEADER_OFFSET \
|
||||
((void)0, ((U.uiflag & USER_AREA_CORNER_HANDLE) ? 16.0f : 8.0f) * UI_SCALE_FAC)
|
||||
|
||||
#define UI_AZONESPOTW UI_HEADER_OFFSET /* Width of corner action zone #AZone. */
|
||||
#define UI_AZONESPOTH (0.6f * U.widget_unit) /* Height of corner action zone #AZone. */
|
||||
#define UI_AZONESPOTW_LEFT UI_HEADER_OFFSET /* Width of left-side corner #AZone. */
|
||||
#define UI_AZONESPOTW_RIGHT (8.0f * UI_SCALE_FAC) /* Width of right-side corner #AZone. */
|
||||
#define UI_AZONESPOTH (0.6f * U.widget_unit) /* Height of corner action zone #AZone. */
|
||||
|
||||
/* uiLayoutOperatorButs flags */
|
||||
enum {
|
||||
|
||||
@@ -338,7 +338,7 @@ static void ui_update_flexible_spacing(const ARegion *region, uiBlock *block)
|
||||
for (const std::unique_ptr<uiBut> &but : block->buttons) {
|
||||
if (but->type == ButType::SeprSpacer) {
|
||||
ui_but_to_pixelrect(&rect, region, block, but.get());
|
||||
spacers_pos.append(rect.xmax + UI_HEADER_OFFSET);
|
||||
spacers_pos.append(rect.xmax + int(8.0f * UI_SCALE_FAC));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -191,8 +191,8 @@ static void view2d_masks(View2D *v2d, const rcti *mask_scroll)
|
||||
|
||||
/* Adjust horizontal scroller to avoid interfering with splitter areas. */
|
||||
if (scroll & V2D_SCROLL_HORIZONTAL) {
|
||||
v2d->hor.xmin += UI_AZONESPOTW;
|
||||
v2d->hor.xmax -= UI_AZONESPOTW;
|
||||
v2d->hor.xmin += UI_AZONESPOTW_LEFT;
|
||||
v2d->hor.xmax -= UI_AZONESPOTW_RIGHT;
|
||||
}
|
||||
|
||||
/* Adjust vertical scroller to avoid horizontal scrollers and splitter areas. */
|
||||
|
||||
@@ -1061,20 +1061,20 @@ static void area_azone_init(const wmWindow *win, const bScreen *screen, ScrArea
|
||||
/* Bottom-left. */
|
||||
{area->totrct.xmin - U.pixelsize,
|
||||
area->totrct.ymin - U.pixelsize,
|
||||
area->totrct.xmin + UI_HEADER_OFFSET,
|
||||
area->totrct.xmin + UI_AZONESPOTW_LEFT,
|
||||
float(area->totrct.ymin + ED_area_headersize())},
|
||||
/* Bottom-right. */
|
||||
{area->totrct.xmax - UI_AZONESPOTW,
|
||||
{area->totrct.xmax - UI_AZONESPOTW_RIGHT,
|
||||
area->totrct.ymin - U.pixelsize,
|
||||
area->totrct.xmax + U.pixelsize,
|
||||
area->totrct.ymin + UI_AZONESPOTH},
|
||||
/* Top-left. */
|
||||
{area->totrct.xmin - U.pixelsize,
|
||||
float(area->totrct.ymax - ED_area_headersize()),
|
||||
area->totrct.xmin + UI_HEADER_OFFSET,
|
||||
area->totrct.xmin + UI_AZONESPOTW_LEFT,
|
||||
area->totrct.ymax + U.pixelsize},
|
||||
/* Top-right. */
|
||||
{area->totrct.xmax - UI_AZONESPOTW,
|
||||
{area->totrct.xmax - UI_AZONESPOTW_RIGHT,
|
||||
area->totrct.ymax - UI_AZONESPOTH,
|
||||
area->totrct.xmax + U.pixelsize,
|
||||
area->totrct.ymax + U.pixelsize},
|
||||
|
||||
@@ -945,7 +945,7 @@ static AZone *area_actionzone_refresh_xy(ScrArea *area, const int xy[2], const b
|
||||
}
|
||||
else {
|
||||
const int mouse_sq = square_i(xy[0] - az->x2) + square_i(xy[1] - az->y2);
|
||||
const int spot_sq = square_i(UI_AZONESPOTW);
|
||||
const int spot_sq = square_i(UI_AZONESPOTW_RIGHT);
|
||||
const int fadein_sq = square_i(AZONEFADEIN);
|
||||
const int fadeout_sq = square_i(AZONEFADEOUT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user