For overlapping regions, we currently offset the edge for resizing
regions a bit towards the contents. This makes sense for example in the
sidebar, where the region background is fully transparent by default,
and users expect the edge to be where the visible contents begin. This
was an issue in #104831 for two reasons:
- Although the region overlaps, we decided to make it fully opaque by
default. The offset is still applied, making the edge detection feel
broken.
- The offset would also be applied to header-like regions, where there
is not much padding between the edge and the content. So the edge to
resize the region would overlap buttons.
2 changes to address this:
- Only apply the offset if the region background is transparent-ish,
with a rather arbitrary alpha threshold.
- Do not apply the offset for header-like regions.