Workaround T56752: redo panel alpha flicker
The bug applies to tooltips, but isn't as noticeable.
This commit is contained in:
parent
58a8277098
commit
a0fdea271b
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue