[Bf-blender-cvs] [dfb8c90324c] master: Cleanup: Remove unused scrollbar drawing flag

Julian Eisel noreply at git.blender.org
Sat May 21 00:54:08 CEST 2022


Commit: dfb8c90324c018068f12ca41543c3c311dff6d21
Author: Julian Eisel
Date:   Sat May 21 00:50:26 2022 +0200
Branches: master
https://developer.blender.org/rBdfb8c90324c018068f12ca41543c3c311dff6d21

Cleanup: Remove unused scrollbar drawing flag

Apparently this was used for progressbar drawing, which doesn't share
the code anymore.

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

M	source/blender/editors/include/UI_interface.h
M	source/blender/editors/interface/interface_widgets.c

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

diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 60c95bbb27d..a38dea0ba3d 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -454,7 +454,6 @@ void UI_draw_safe_areas(uint pos,
 enum {
   UI_SCROLL_PRESSED = 1 << 0,
   UI_SCROLL_ARROWS = 1 << 1,
-  UI_SCROLL_NO_OUTLINE = 1 << 2,
 };
 /**
  * Function in use for buttons and for view2d sliders.
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 77fd226a170..e53d90a233e 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -3506,7 +3506,6 @@ static void widget_numbut_embossn(const uiBut *UNUSED(but),
 void UI_draw_widget_scroll(uiWidgetColors *wcol, const rcti *rect, const rcti *slider, int state)
 {
   uiWidgetBase wtb;
-  bool outline = false;
 
   widget_init(&wtb);
 
@@ -3551,11 +3550,6 @@ void UI_draw_widget_scroll(uiWidgetColors *wcol, const rcti *rect, const rcti *s
     /* draw */
     wtb.draw_emboss = false; /* only emboss once */
 
-    /* exception for progress bar */
-    if (state & UI_SCROLL_NO_OUTLINE) {
-      SWAP(bool, outline, wtb.draw_outline);
-    }
-
     round_box_edges(&wtb, UI_CNR_ALL, slider, rad);
 
     if (state & UI_SCROLL_ARROWS) {
@@ -3583,10 +3577,6 @@ void UI_draw_widget_scroll(uiWidgetColors *wcol, const rcti *rect, const rcti *s
       }
     }
     widgetbase_draw(&wtb, wcol);
-
-    if (state & UI_SCROLL_NO_OUTLINE) {
-      SWAP(bool, outline, wtb.draw_outline);
-    }
   }
 }



More information about the Bf-blender-cvs mailing list