Tweak/code shuffle to make disabled buttons draw nicer on nodes.
authorMatt Ebb <matt@mke3.net>
Tue, 6 Apr 2010 09:05:00 +0000 (09:05 +0000)
committerMatt Ebb <matt@mke3.net>
Tue, 6 Apr 2010 09:05:00 +0000 (09:05 +0000)
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/space_node/node_draw.c

index 77958b3454b42935bbfbb49b1b80a07b414df720..1267a1c173729084e129e91ce10ee08a306363d6 100644 (file)
@@ -749,8 +749,6 @@ void uiDrawBlock(const bContext *C, uiBlock *block)
        
        wmOrtho2(-0.01f, ar->winx-0.01f, -0.01f, ar->winy-0.01f);
        
-       UI_ThemeClearColor(TH_BACK);
-       
        /* back */
        if(block->flag & UI_BLOCK_LOOP)
                ui_draw_menu_back(&style, block, &rect);
index e4088a64a17ff8f182746d186611dfb9f8f9eeef..278dba13b6b683ddfa12645dbe1d6cca49acbebe 100644 (file)
@@ -864,6 +864,8 @@ void uiEndPanels(const bContext *C, ARegion *ar)
        if(firstpa)
                firstpa->runtime_flag |= PNL_FIRST;
 
+       UI_ThemeClearColor(TH_BACK);
+       
        /* draw panels, selected on top */
        for(block= ar->uiblocks.first; block; block=block->next) {
                if(block->active && block->panel && !(block->panel->flag & PNL_SELECT)) {
index 2dfc3273ec82c0241d562857bf4b638aad792466..9e83723c29603efc03e01452c0f32ab46b3528ef 100644 (file)
@@ -845,6 +845,8 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
                        node_draw_preview(node->preview, &node->prvr);
                BLI_unlock_thread(LOCK_PREVIEW);
        }
+       
+       UI_ThemeClearColor(color_id);
                
        uiEndBlock(C, node->block);
        uiDrawBlock(C, node->block);