From 2e1244f3cf192c73eb0aa590726a413b22ea2980 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 30 Oct 2023 18:13:17 +0100 Subject: [PATCH] Fix resizing asset shelf header edge not working without region overlap If region overlap was disabled, the full background of the asset shelf header would be drawn, unlike usually where we keep the space between button sections transparent. But resizing the region by dragging wasn't possible from the space between the button sections, even though the header was fully opaque. Button section drawing should only be respected when region overlap is enabled. --- source/blender/editors/screen/screen_ops.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/screen/screen_ops.cc b/source/blender/editors/screen/screen_ops.cc index 59b70ecbd6d..b0366231c35 100644 --- a/source/blender/editors/screen/screen_ops.cc +++ b/source/blender/editors/screen/screen_ops.cc @@ -850,11 +850,11 @@ static AZone *area_actionzone_refresh_xy(ScrArea *area, const int xy[2], const b const ARegion *region = az->region; const int local_xy[2] = {xy[0] - region->winrct.xmin, xy[1] - region->winrct.ymin}; - /* Respect button sections: If the mouse is horizontally hovering empty space defined by a - * separator-spacer between buttons, don't allow scaling the region from there. Used for - * regions that have a transparent background between such button sections, users don't - * expect to be able to resize from there. */ - if (region->visible && (region->flag & RGN_FLAG_RESIZE_RESPECT_BUTTON_SECTIONS) && + /* Respect button sections: Clusters of buttons (separated using separator-spacers) are + * drawn with a background, in-between them the region is fully transparent (if "Region + * Overlap" is enabled). Only allow dragging visible edges, so at the button sections. */ + if (region->visible && region->overlap && + (region->flag & RGN_FLAG_RESIZE_RESPECT_BUTTON_SECTIONS) && !UI_region_button_sections_is_inside_x(az->region, local_xy[0])) { az = nullptr;