diff options
author | Matt Ebb <matt@mke3.net> | 2009-11-04 07:13:30 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2009-11-04 07:13:30 +0300 |
commit | 7699dcaab887f2950e558ea51081948244e16560 (patch) | |
tree | 22fa7ed245fc2f8af47e06063474a4f7b5b577d8 /source/blender/editors/screen/area.c | |
parent | 183e698af8f8e7a04eab1e5f2023aa9363543e3a (diff) |
Fix for [#19460] (+) widgets to expand UI elements overlap other windows
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r-- | source/blender/editors/screen/area.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 428f17886ec..be76e153fae 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -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); |