Fix buttons not being grayed out
Was using the wrong bitfield in flag comparisons for the drawing code.
The input handling wouldn't be affected. Own mistake in 0d73113452
.
This commit is contained in:
parent
cd77bf44d4
commit
bc1eb513ab
|
@ -1302,14 +1302,14 @@ static void widgetbase_draw(uiWidgetBase *wtb, const uiWidgetColors *wcol)
|
|||
|
||||
static float widget_alpha_factor(const uiWidgetStateInfo *state)
|
||||
{
|
||||
if (state->but_drawflag & (UI_BUT_INACTIVE | UI_BUT_DISABLED)) {
|
||||
if (state->but_drawflag & UI_SEARCH_FILTER_NO_MATCH) {
|
||||
if (state->but_flag & (UI_BUT_INACTIVE | UI_BUT_DISABLED)) {
|
||||
if (state->but_flag & UI_SEARCH_FILTER_NO_MATCH) {
|
||||
return 0.25f;
|
||||
}
|
||||
return 0.5f;
|
||||
}
|
||||
|
||||
if (state->but_drawflag & UI_SEARCH_FILTER_NO_MATCH) {
|
||||
if (state->but_flag & UI_SEARCH_FILTER_NO_MATCH) {
|
||||
return 0.5f;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue