Merge pull request #57462 from mashumafi/master-fix-button-icon-alpha3

Fix button icon_disabled_color alpha channel
This commit is contained in:
Rémi Verschelde 2022-01-31 14:53:22 +01:00 committed by GitHub
commit 777c821748
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -197,6 +197,8 @@ void Button::_notification(int p_what) {
color = get_theme_color(SNAME("font_disabled_color"));
if (has_theme_color(SNAME("icon_disabled_color"))) {
color_icon = get_theme_color(SNAME("icon_disabled_color"));
} else {
color_icon.a = 0.4;
}
} break;
@ -232,9 +234,6 @@ void Button::_notification(int p_what) {
}
if (!_icon.is_null()) {
int valign = size.height - style->get_minimum_size().y;
if (is_disabled()) {
color_icon.a = 0.4;
}
float icon_ofs_region = 0.0;
Point2 style_offset;