Fix T78630: Custom icons not grayed out in inactive layouts

For regular icons this worked because they used the text color, which
was already grayed out by the caller.
This commit is contained in:
Julian Eisel 2020-08-05 12:12:05 +02:00
parent de53178b26
commit c3113724ed
Notes: blender-bot 2023-02-14 06:49:57 +01:00
Referenced by issue #78630, Custom icon preview does not greyout on UILayout.active = False
1 changed files with 1 additions and 1 deletions

View File

@ -1401,7 +1401,7 @@ static void widget_draw_icon(
}
}
else if (ELEM(but->type, UI_BTYPE_BUT)) {
if (but->flag & UI_BUT_DISABLED) {
if (but->flag & (UI_BUT_DISABLED | UI_BUT_INACTIVE)) {
alpha *= 0.5f;
}
}