From a180b754eb40637a5d37eeb0ae60066f5a6f93d8 Mon Sep 17 00:00:00 2001 From: George Vogiatzis Date: Fri, 5 Apr 2019 13:48:26 +0200 Subject: Interface: New region type 'Footer', used by text editor * It can be hidden by dragging it up/down. * It can be at the top or bottom, independent of the header. * It uses the color theme from the header. * It does not change its color, when the area becomes active. Currently, it is used in the text editor to display the file path. Differential Revision: https://developer.blender.org/D4601 --- source/blender/blenloader/intern/versioning_280.c | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index a1087caf40c..5c0ff1af7b2 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -2969,5 +2969,29 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) { /* Versioning code until next subversion bump goes here. */ + + for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { + for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { + for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { + if (sl->spacetype == SPACE_TEXT) { + ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase; + ARegion *ar = MEM_callocN(sizeof(ARegion), "footer for text"); + ARegion *ar_header = NULL; + + for (ar_header = regionbase->first; ar_header; ar_header = ar_header->next) { + if (ar_header->regiontype == RGN_TYPE_HEADER) { + break; + } + } + BLI_assert(ar_header); + + BLI_insertlinkafter(regionbase, ar_header, ar); + + ar->regiontype = RGN_TYPE_FOOTER; + ar->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_TOP : RGN_ALIGN_BOTTOM; + } + } + } + } } } -- cgit v1.2.3