summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authormashumafi <mashumafi@gmail.com>2022-01-30 14:25:42 -0500
committermashumafi <mashumafi@gmail.com>2022-01-30 14:25:42 -0500
commitc317a9735981e03a8c230916617503ca006f0a08 (patch)
treef888848ccefb2b6c6aea48383be0a058440f0ab3 /scene/gui
parent78e3e65e7c38d18128524e0822a106ac76e38800 (diff)
Fix button icon_color_disabled alpha channel
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/button.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp
index 552dd28513..3ed1b873af 100644
--- a/scene/gui/button.cpp
+++ b/scene/gui/button.cpp
@@ -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;