Fix for [#19460] (+) widgets to expand UI elements overlap other windows
This commit is contained in:
@@ -498,11 +498,16 @@ static void region_azone_edge(AZone *az, ARegion *ar)
|
||||
static void region_azone_icon(ScrArea *sa, AZone *az, ARegion *ar)
|
||||
{
|
||||
AZone *azt;
|
||||
int tot=0;
|
||||
|
||||
for(azt= sa->actionzones.first; azt; azt= azt->next) {
|
||||
if(azt->edge == az->edge) tot++;
|
||||
}
|
||||
|
||||
if(az->edge=='t') {
|
||||
az->x1= ar->winrct.xmax - AZONEPAD_ICON;
|
||||
az->x1= ar->winrct.xmax - tot*2*AZONEPAD_ICON;
|
||||
az->y1= ar->winrct.ymax + AZONEPAD_ICON;
|
||||
az->x2= ar->winrct.xmax - 2*AZONEPAD_ICON;
|
||||
az->x2= ar->winrct.xmax - tot*AZONEPAD_ICON;
|
||||
az->y2= ar->winrct.ymax + 2*AZONEPAD_ICON;
|
||||
}
|
||||
else if(az->edge=='b') {
|
||||
@@ -513,15 +518,15 @@ static void region_azone_icon(ScrArea *sa, AZone *az, ARegion *ar)
|
||||
}
|
||||
else if(az->edge=='l') {
|
||||
az->x1= ar->winrct.xmin - 2*AZONEPAD_ICON;
|
||||
az->y1= ar->winrct.ymax - 2*AZONEPAD_ICON;
|
||||
az->y1= ar->winrct.ymax - tot*2*AZONEPAD_ICON;
|
||||
az->x2= ar->winrct.xmin - AZONEPAD_ICON;
|
||||
az->y2= ar->winrct.ymax - AZONEPAD_ICON;
|
||||
az->y2= ar->winrct.ymax - tot*AZONEPAD_ICON;
|
||||
}
|
||||
else { // if(az->edge=='r') {
|
||||
az->x1= ar->winrct.xmax + AZONEPAD_ICON;
|
||||
az->y1= ar->winrct.ymax - 2*AZONEPAD_ICON;
|
||||
az->y1= ar->winrct.ymax - tot*2*AZONEPAD_ICON;
|
||||
az->x2= ar->winrct.xmax + 2*AZONEPAD_ICON;
|
||||
az->y2= ar->winrct.ymax - AZONEPAD_ICON;
|
||||
az->y2= ar->winrct.ymax - tot*AZONEPAD_ICON;
|
||||
}
|
||||
|
||||
BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2);
|
||||
|
||||
Reference in New Issue
Block a user