From 6f20fcd5984a47baee9ff440e9e59584fccd1e59 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Wed, 23 May 2018 22:38:25 +0200 Subject: UI: Global "Status-bar" Area (WIP) * Add horizontal bar at bottom of all non-temp windows, similar to the Top-bar. * Status-bar is hidden in UI-less fullscreen mode * Current contents are preliminary and based on T54861: ** Left: Current file-path if needed. "(Modified)" note if file was changed. ** Center: Scene statistics (like in 2.7 Info Editor). ** Right: Progress-bars and reports * Internally managed as own "STATUSBAR" editor-type (hidden in UI). * Like with the Top-bar, Status-bar data and SDNA writing is disabled. * Most changes in low-level screen/area code are to support layout bounds that differ from window bounds. Design task: T54861 Main changes approved by @brecht. --- source/blender/blenloader/intern/writefile.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index d94fe790c9d..f3042dc84db 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2879,10 +2879,13 @@ static void write_area_regions(WriteData *wd, ScrArea *area) } writestruct(wd, DATA, SpaceConsole, 1, sl); } -#ifdef WITH_TOPBAR_WRITING +#ifdef WITH_GLOBAL_AREA_WRITING else if (sl->spacetype == SPACE_TOPBAR) { writestruct(wd, DATA, SpaceTopBar, 1, sl); } + else if (sl->spacetype == SPACE_STATUSBAR) { + writestruct(wd, DATA, SpaceStatusBar, 1, sl); + } #endif else if (sl->spacetype == SPACE_USERPREF) { writestruct(wd, DATA, SpaceUserPref, 1, sl); @@ -2905,7 +2908,7 @@ static void write_area_map(WriteData *wd, ScrAreaMap *area_map) writestruct(wd, DATA, ScrArea, 1, area); -#ifdef WITH_TOPBAR_WRITING +#ifdef WITH_GLOBAL_AREA_WRITING writestruct(wd, DATA, ScrGlobalAreaData, 1, area->global); #endif @@ -2921,7 +2924,7 @@ static void write_windowmanager(WriteData *wd, wmWindowManager *wm) write_iddata(wd, &wm->id); for (wmWindow *win = wm->windows.first; win; win = win->next) { -#ifndef WITH_TOPBAR_WRITING +#ifndef WITH_GLOBAL_AREA_WRITING /* Don't write global areas yet, while we make changes to them. */ ScrAreaMap global_areas = win->global_areas; memset(&win->global_areas, 0, sizeof(win->global_areas)); @@ -2934,7 +2937,7 @@ static void write_windowmanager(WriteData *wd, wmWindowManager *wm) writestruct(wd, DATA, WorkSpaceInstanceHook, 1, win->workspace_hook); writestruct(wd, DATA, Stereo3dFormat, 1, win->stereo3d_format); -#ifdef WITH_TOPBAR_WRITING +#ifdef WITH_GLOBAL_AREA_WRITING write_area_map(wd, &win->global_areas); #else win->global_areas = global_areas; -- cgit v1.2.3