[Bf-blender-cvs] [c641107c958] master: Fix T92800: (UI) Radial control values get wrong color assigned

Julian Eisel noreply at git.blender.org
Thu Nov 4 11:52:42 CET 2021


Commit: c641107c9580d684d78898bb676ec5dddcad17f5
Author: Julian Eisel
Date:   Thu Nov 4 11:49:25 2021 +0100
Branches: master
https://developer.blender.org/rBc641107c9580d684d78898bb676ec5dddcad17f5

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.

===================================================================

M	source/blender/windowmanager/intern/wm_draw.c

===================================================================

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);



More information about the Bf-blender-cvs mailing list