diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-11 04:05:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-11 04:05:57 +0400 |
commit | b8b7e5d1374fa17ed3776bd6554d173304858dbf (patch) | |
tree | 37896b61d3297d3c757d3898fb415e2fc6facd47 | |
parent | 35e4cfc6d647f8ba0253c6f2c48d879983ef59b4 (diff) |
fix for minor UI annoyance - when the window is fullscreen now dont draw area corners since areas cant be split when fullscreen.
-rw-r--r-- | source/blender/editors/include/ED_screen_types.h | 4 | ||||
-rw-r--r-- | source/blender/editors/screen/area.c | 13 |
2 files changed, 12 insertions, 5 deletions
diff --git a/source/blender/editors/include/ED_screen_types.h b/source/blender/editors/include/ED_screen_types.h index 6b9d8385ac3..527ebb6c3ef 100644 --- a/source/blender/editors/include/ED_screen_types.h +++ b/source/blender/editors/include/ED_screen_types.h @@ -98,7 +98,7 @@ typedef struct AZone { } AZone; /* actionzone type */ -#define AZONE_AREA 1 -#define AZONE_REGION 2 +#define AZONE_AREA 1 /* corner widgets for splitting areas */ +#define AZONE_REGION 2 /* when a region is collapsed, draw a handle to expose */ #endif /* __ED_SCREEN_TYPES_H__ */ diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 92281dc0645..293af4357d4 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -167,6 +167,9 @@ void ED_area_overdraw_flush(ScrArea *sa, ARegion *ar) } } +/** + * \brief Corner widgets use for dragging and splitting the view. + */ static void area_draw_azone(short x1, short y1, short x2, short y2) { int dx = x2 - x1; @@ -592,13 +595,17 @@ void ED_area_headerprint(ScrArea *sa, const char *str) /* ************************************************************ */ -static void area_azone_initialize(ScrArea *sa) +static void area_azone_initialize(bScreen *screen, ScrArea *sa) { AZone *az; /* reinitalize entirely, regions add azones too */ BLI_freelistN(&sa->actionzones); - + + if (screen->full != SCREENNORMAL) { + return; + } + /* set area action zones */ az = (AZone *)MEM_callocN(sizeof(AZone), "actionzone"); BLI_addtail(&(sa->actionzones), az); @@ -1219,7 +1226,7 @@ void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *sa) area_calc_totrct(sa, win->sizex, win->sizey); /* clear all azones, add the area triange widgets */ - area_azone_initialize(sa); + area_azone_initialize(win->screen, sa); /* region rect sizes */ rect = sa->totrct; |