diff options
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r-- | source/blender/editors/screen/area.c | 51 |
1 files changed, 21 insertions, 30 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index ad9b0f61eb1..d14514546f5 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -407,12 +407,8 @@ void region_scissor_winrct(ARegion *ar, rcti *winrct) ar = ar->prev; if (BLI_rcti_isect(winrct, &ar->winrct, NULL)) { - if (ar->flag & RGN_FLAG_HIDDEN) { - /* pass */ - } - else if (ar->alignment & RGN_SPLIT_PREV) { - /* pass */ - } + if (ar->flag & RGN_FLAG_HIDDEN) ; + else if (ar->alignment & RGN_SPLIT_PREV) ; else if (ar->alignment == RGN_OVERLAP_LEFT) { winrct->xmin = ar->winrct.xmax + 1; } @@ -939,25 +935,20 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int /* prefsize, for header we stick to exception */ prefsizex = ar->sizex ? ar->sizex : ar->type->prefsizex; - if (ar->regiontype == RGN_TYPE_HEADER) { + if (ar->regiontype == RGN_TYPE_HEADER) prefsizey = ar->type->prefsizey; - } else if (ar->regiontype == RGN_TYPE_UI && sa->spacetype == SPACE_FILE) { prefsizey = UI_UNIT_Y * 2 + (UI_UNIT_Y / 2); } - else { + else prefsizey = ar->sizey ? ar->sizey : ar->type->prefsizey; - } - - - if (ar->flag & RGN_FLAG_HIDDEN) { - /* hidden is user flag */ - } - else if (alignment == RGN_ALIGN_FLOAT) { - /* XXX floating area region, not handled yet here */ - } + + /* hidden is user flag */ + if (ar->flag & RGN_FLAG_HIDDEN) ; + /* XXX floating area region, not handled yet here */ + else if (alignment == RGN_ALIGN_FLOAT) ; + /* remainder is too small for any usage */ else if (rct_fits(remainder, 'v', 1) < 0 || rct_fits(remainder, 'h', 1) < 0) { - /* remainder is too small for any usage */ ar->flag |= RGN_FLAG_TOO_SMALL; } else if (alignment == RGN_ALIGN_NONE) { @@ -1468,39 +1459,39 @@ void ED_area_prevspace(bContext *C, ScrArea *sa) static const char *editortype_pup(void) { const char *types = N_( - "Editor type: %t" + "Editor type:%t" "|3D View %x1" "|%l" - + "|Timeline %x15" "|Graph Editor %x2" "|DopeSheet %x12" "|NLA Editor %x13" - + "|%l" - + "|UV/Image Editor %x6" - + "|Video Sequence Editor %x8" "|Movie Clip Editor %x20" "|Text Editor %x9" "|Node Editor %x16" "|Logic Editor %x17" - + "|%l" - + "|Properties %x4" "|Outliner %x3" "|User Preferences %x19" - "|Info %x7" + "|Info%x7" "|%l" "|File Browser %x5" - + "|%l" - + "|Python Console %x18" ); @@ -1526,7 +1517,7 @@ int ED_area_header_switchbutton(const bContext *C, uiBlock *block, int yco) but = uiDefIconTextButC(block, ICONTEXTROW, 0, ICON_VIEW3D, editortype_pup(), xco, yco, UI_UNIT_X + 10, UI_UNIT_Y, &(sa->butspacetype), 1.0, SPACEICONMAX, 0, 0, - TIP_("Display current editor type (click for a menu of available types)")); + TIP_("Displays current editor type. Click for menu of available types")); uiButSetFunc(but, spacefunc, NULL, NULL); uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */ |