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:
Julian Eisel 2022-05-24 11:27:56 +02:00
parent cd77bf44d4
commit bc1eb513ab
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}