diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-08 18:29:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-08 18:30:00 +0300 |
commit | f2fd5987d0f592567f1da8d080e5fe38acb12ec8 (patch) | |
tree | 0c0092130c54d6f12252d7401da97443795db523 /source/blender/editors/space_buttons | |
parent | 3e86bb2d0bf1b13b4e482411dd176bac13e90961 (diff) |
UI: clear properties color when empty
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r-- | source/blender/editors/space_buttons/space_buttons.c | 9 |
1 files changed, 8 insertions, 1 deletions
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) |