From c641107c9580d684d78898bb676ec5dddcad17f5 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Thu, 4 Nov 2021 11:49:25 +0100 Subject: Fix T92800: (UI) Radial control values get wrong color assigned The global theme state didn't get updated or unset properly when drawing overlays. Now paint cursors use the theme settings of the space they are in, while global overlays use the global fallback, which is the main 3D View region. --- source/blender/windowmanager/intern/wm_draw.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender') diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 8acce240046..d8d57a9370c 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -108,6 +108,8 @@ static void wm_paintcursor_draw(bContext *C, ScrArea *area, ARegion *region) } if (pc->poll == NULL || pc->poll(C)) { + UI_SetTheme(area->spacetype, region->regiontype); + /* Prevent drawing outside region. */ GPU_scissor_test(true); GPU_scissor(region->winrct.xmin, @@ -839,6 +841,7 @@ static void wm_draw_window_onscreen(bContext *C, wmWindow *win, int view) } /* After area regions so we can do area 'overlay' drawing. */ + UI_SetTheme(0, 0); ED_screen_draw_edges(win); wm_draw_callbacks(win); wmWindowViewport(win); -- cgit v1.2.3