diff options
author | Julian Eisel <julian@blender.org> | 2021-11-04 13:49:25 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-11-04 13:52:11 +0300 |
commit | c641107c9580d684d78898bb676ec5dddcad17f5 (patch) | |
tree | 7e8dd6743aa2cbe21becad302740c866c2b663d6 /source/blender/windowmanager/intern/wm_draw.c | |
parent | 978ef093db0b1424b2bff73f7973bcf9e0a96b2d (diff) |
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.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_draw.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_draw.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |