From a118837af49bf7114d4ed474711413e576cf492e Mon Sep 17 00:00:00 2001 From: mashumafi Date: Sun, 30 Jan 2022 13:15:05 -0500 Subject: [PATCH] Fix button icon_color_disabled alpha channel --- scene/gui/button.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index 353a01d39ea..d0e932dc71c 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -151,8 +151,9 @@ void Button::_notification(int p_what) { color = get_color("font_color_disabled"); if (has_color("icon_color_disabled")) { color_icon = get_color("icon_color_disabled"); + } else { + color_icon.a = 0.4; } - } break; } @@ -172,9 +173,6 @@ void Button::_notification(int p_what) { Rect2 icon_region = Rect2(); 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; if (_internal_margin[MARGIN_LEFT] > 0) {