revert own fix for [#27648], looks like this needs to work differently to be fixed.
This commit is contained in:
@@ -2601,6 +2601,7 @@ static void widget_box(uiBut *but, uiWidgetColors *wcol, rcti *rect, int UNUSED(
|
||||
|
||||
/* store the box bg as gl clearcolor, to retrieve later when drawing semi-transparent rects
|
||||
* over the top to indicate disabled buttons */
|
||||
/* XXX, this doesnt work right since the color applies to buttons outside the box too. */
|
||||
glClearColor(wcol->inner[0]/255.0, wcol->inner[1]/255.0, wcol->inner[2]/255.0, 1.0);
|
||||
|
||||
VECCOPY(wcol->inner, old_col);
|
||||
@@ -2877,10 +2878,6 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
|
||||
uiFontStyle *fstyle= &style->widget;
|
||||
uiWidgetType *wt= NULL;
|
||||
|
||||
/* backup the clear color [#27648], box widget clears it */
|
||||
float clear_col[4];
|
||||
glGetFloatv(GL_COLOR_CLEAR_VALUE, clear_col);
|
||||
|
||||
/* handle menus separately */
|
||||
if(but->dt==UI_EMBOSSP) {
|
||||
switch (but->type) {
|
||||
@@ -3077,9 +3074,6 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
|
||||
if(but->dt!=UI_EMBOSSP)
|
||||
widget_disabled(&disablerect);
|
||||
}
|
||||
|
||||
/* restore clear color incase it changed */
|
||||
glClearColor(clear_col[0], clear_col[1], clear_col[2], clear_col[3]);
|
||||
}
|
||||
|
||||
void ui_draw_menu_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect)
|
||||
|
||||
Reference in New Issue
Block a user