[Bf-blender-cvs] [f2fd5987d0f] blender2.8: UI: clear properties color when empty
Campbell Barton
noreply at git.blender.org
Fri Jun 8 17:30:27 CEST 2018
Commit: f2fd5987d0f592567f1da8d080e5fe38acb12ec8
Author: Campbell Barton
Date: Fri Jun 8 17:29:29 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBf2fd5987d0f592567f1da8d080e5fe38acb12ec8
UI: clear properties color when empty
===================================================================
M source/blender/editors/space_buttons/space_buttons.c
===================================================================
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 3787398c9e3..be687d365f3 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -52,6 +52,8 @@
#include "UI_resources.h"
+#include "GPU_glew.h"
+
#include "buttons_intern.h" /* own include */
/* ******************** default callbacks for buttons space ***************** */
@@ -209,11 +211,11 @@ static void buttons_main_region_draw_properties(const bContext *C, SpaceButs *sb
static void buttons_main_region_draw_tool(const bContext *C, SpaceButs *sbuts, ARegion *ar)
{
const bool vertical = (sbuts->align == BUT_VERTICAL);
+ const char *contexts[3] = {NULL};
const WorkSpace *workspace = CTX_wm_workspace(C);
if (workspace->tools_space_type == SPACE_VIEW3D) {
const int mode = CTX_data_mode_enum(C);
- const char *contexts[3] = {NULL};
switch (mode) {
case CTX_MODE_EDIT_MESH:
ARRAY_SET_ITEMS(contexts, ".mesh_edit");
@@ -265,6 +267,11 @@ static void buttons_main_region_draw_tool(const bContext *C, SpaceButs *sbuts, A
else if (workspace->tools_space_type == SPACE_IMAGE) {
/* TODO */
}
+
+ if (contexts[0] == NULL) {
+ UI_ThemeClearColor(TH_BACK);
+ glClear(GL_COLOR_BUFFER_BIT);
+ }
}
static void buttons_main_region_draw(const bContext *C, ARegion *ar)
More information about the Bf-blender-cvs
mailing list