diff options
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r-- | source/blender/editors/interface/interface.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 5b27fe88b4b..eff4d1f6397 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -962,6 +962,7 @@ void uiDrawBlock(const bContext *C, uiBlock *block) ARegion *ar; uiBut *but; rcti rect; + int multisample_enabled; /* get menu region or area region */ ar= CTX_wm_menu(C); @@ -971,6 +972,11 @@ void uiDrawBlock(const bContext *C, uiBlock *block) if(!block->endblock) uiEndBlock(C, block); + /* disable AA, makes widgets too blurry */ + multisample_enabled= glIsEnabled(GL_MULTISAMPLE_ARB); + if(multisample_enabled) + glDisable(GL_MULTISAMPLE_ARB); + /* we set this only once */ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -1015,6 +1021,9 @@ void uiDrawBlock(const bContext *C, uiBlock *block) glPopMatrix(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); + + if(multisample_enabled) + glEnable(GL_MULTISAMPLE_ARB); ui_draw_links(block); } @@ -2560,10 +2569,12 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str, if(block->curlayout) ui_layout_add_but(block->curlayout, but); +#ifdef WITH_PYTHON /* if the 'UI_OT_editsource' is running, extract the source info from the button */ if (UI_editsource_enable_check()) { UI_editsource_active_but_test(but); } +#endif return but; } |