Fix button icon_color_disabled alpha channel

This commit is contained in:
mashumafi 2022-01-30 13:15:05 -05:00
parent 9cdd110cc3
commit a118837af4
1 changed files with 2 additions and 4 deletions

View File

@ -151,8 +151,9 @@ void Button::_notification(int p_what) {
color = get_color("font_color_disabled"); color = get_color("font_color_disabled");
if (has_color("icon_color_disabled")) { if (has_color("icon_color_disabled")) {
color_icon = get_color("icon_color_disabled"); color_icon = get_color("icon_color_disabled");
} else {
color_icon.a = 0.4;
} }
} break; } break;
} }
@ -172,9 +173,6 @@ void Button::_notification(int p_what) {
Rect2 icon_region = Rect2(); Rect2 icon_region = Rect2();
if (!_icon.is_null()) { if (!_icon.is_null()) {
int valign = size.height - style->get_minimum_size().y; int valign = size.height - style->get_minimum_size().y;
if (is_disabled()) {
color_icon.a = 0.4;
}
float icon_ofs_region = 0; float icon_ofs_region = 0;
if (_internal_margin[MARGIN_LEFT] > 0) { if (_internal_margin[MARGIN_LEFT] > 0) {