[Bf-blender-cvs] [10d7740e010] blender2.8: UI: show messages and progress in topbar when status bar is collapsed.

Brecht Van Lommel noreply at git.blender.org
Thu Nov 1 19:46:05 CET 2018


Commit: 10d7740e010f1c2c15072516a6427977166a60ee
Author: Brecht Van Lommel
Date:   Thu Nov 1 19:39:40 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB10d7740e010f1c2c15072516a6427977166a60ee

UI: show messages and progress in topbar when status bar is collapsed.

===================================================================

M	release/scripts/startup/bl_ui/space_topbar.py
M	source/blender/editors/space_topbar/space_topbar.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 1f931529800..05221151b40 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -64,8 +64,14 @@ class TOPBAR_HT_upper_bar(Header):
         layout = self.layout
 
         window = context.window
+        screen = context.screen
         scene = window.scene
 
+        # If statusbar is hidden, still show messages at the top
+        if not screen.show_statusbar:
+            layout.template_reports_banner()
+            layout.template_running_jobs()
+
         # Active workspace view-layer is retrieved through window, not through workspace.
         layout.template_ID(window, "scene", new="scene.new", unlink="scene.delete")
 
diff --git a/source/blender/editors/space_topbar/space_topbar.c b/source/blender/editors/space_topbar/space_topbar.c
index db75545fbd6..567a733309c 100644
--- a/source/blender/editors/space_topbar/space_topbar.c
+++ b/source/blender/editors/space_topbar/space_topbar.c
@@ -180,6 +180,14 @@ static void topbar_header_listener(wmWindow *UNUSED(win), ScrArea *UNUSED(sa), A
 {
 	/* context changes */
 	switch (wmn->category) {
+		case NC_WM:
+			if (wmn->data == ND_JOB)
+				ED_region_tag_redraw(ar);
+			break;
+		case NC_SPACE:
+			if (wmn->data == ND_SPACE_INFO)
+				ED_region_tag_redraw(ar);
+			break;
 		case NC_SCREEN:
 			if (wmn->data == ND_LAYER)
 				ED_region_tag_redraw(ar);



More information about the Bf-blender-cvs mailing list