diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-21 11:06:12 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-21 13:41:20 +0300 |
commit | e89fefdc69d22b8d41871d163ce012b72ea13407 (patch) | |
tree | bb77e01470ced1ba332130586e0f8c9a62e33e39 /source/blender/editors/screen/area.c | |
parent | 04fe5edba3d69aa13523488d0e50bfd515cf7891 (diff) |
Topbar: visual tweaks
* Make bottom half of topbar a bit higher
* Make tabs higher and put them closer together
* Remove screen layouts dropdown, we'll have one layout per window
* Hide action zones from topbar
* Don't change topbar background color when activating
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r-- | source/blender/editors/screen/area.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index e4e4e9018a4..3eee303cf54 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -753,6 +753,10 @@ static void area_azone_initialize(wmWindow *win, const bScreen *screen, ScrArea return; } + if (ED_area_is_global(sa)) { + return; + } + /* can't click on bottom corners on OS X, already used for resizing */ #ifdef __APPLE__ if (!(sa->totrct.xmin == 0 && sa->totrct.ymin == 0) || WM_window_is_fullscreen(win)) @@ -1881,9 +1885,16 @@ int ED_area_header_switchbutton(const bContext *C, uiBlock *block, int yco) static ThemeColorID region_background_color_id(const bContext *C, const ARegion *region) { + ScrArea *area = CTX_wm_area(C); + switch (region->regiontype) { case RGN_TYPE_HEADER: - return ED_screen_area_active(C) ? TH_HEADER : TH_HEADERDESEL; + if (ED_screen_area_active(C) || ED_area_is_global(area)) { + return TH_HEADER; + } + else { + return TH_HEADERDESEL; + } case RGN_TYPE_PREVIEW: return TH_PREVIEW_BACK; default: @@ -2187,7 +2198,7 @@ void ED_region_header(const bContext *C, ARegion *ar) UI_view2d_view_ortho(&ar->v2d); xco = maxco = start_ofs; - yco = headery - floor(0.2f * UI_UNIT_Y); + yco = headery + (ar->winy - headery)/2 - floor(0.2f * UI_UNIT_Y); /* XXX workaround for 1 px alignment issue. Not sure what causes it... Would prefer a proper fix - Julian */ if (CTX_wm_area(C)->spacetype == SPACE_TOPBAR) { |