diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-09-11 06:49:37 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-09-11 06:50:30 +0300 |
commit | a0fdea271ba683484d3b75b78605ff1bfdff0577 (patch) | |
tree | d04df2a7741cee8ee5dfdc9ad9be3bf3e04937cd /source/blender/editors | |
parent | 58a8277098b5c8cf43985d7955ad5e5c6f7894ae (diff) |
Workaround T56752: redo panel alpha flicker
The bug applies to tooltips, but isn't as noticeable.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_region_hud.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_region_hud.c b/source/blender/editors/interface/interface_region_hud.c index 89b34f3f152..914b16586ed 100644 --- a/source/blender/editors/interface/interface_region_hud.c +++ b/source/blender/editors/interface/interface_region_hud.c @@ -39,6 +39,7 @@ #include "BLI_rect.h" #include "BLI_listbase.h" #include "BLI_utildefines.h" +#include "BLI_math_color.h" #include "BKE_context.h" #include "BKE_screen.h" @@ -203,7 +204,20 @@ static void hud_region_draw(const bContext *C, ARegion *ar) GPU_clear(GPU_COLOR_BIT); if ((ar->flag & RGN_FLAG_HIDDEN) == 0) { - ui_draw_menu_back(NULL, NULL, &(rcti){.xmax = ar->winx, .ymax = ar->winy}); + if (0) { + /* Has alpha flickering glitch, see T56752. */ + ui_draw_menu_back(NULL, NULL, &(rcti){.xmax = ar->winx, .ymax = ar->winy}); + } + else { + /* Use basic drawing instead. */ + bTheme *btheme = UI_GetTheme(); + float color[4]; + rgba_uchar_to_float(color, (const uchar *)btheme->tui.wcol_menu_back.inner); + const float radius = U.widget_unit * btheme->tui.wcol_menu_back.roundness; + UI_draw_roundbox_corner_set(UI_CNR_ALL); + UI_draw_roundbox_4fv(true, 0, 0, ar->winx, ar->winy, radius, color); + } + ED_region_panels_draw(C, ar); } } |