mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 07:53:26 +00:00
Fix color text's tooltip not being updated when the intensity is more than 0
Before, the tooltip would only change when pressing the "#" button in the editor, but it would never change at runtime or in the editor when changing the intensity
This commit is contained in:
parent
06827c91c6
commit
f394656844
1 changed files with 2 additions and 0 deletions
|
@ -1425,12 +1425,14 @@ void ColorPicker::_update_text_value() {
|
||||||
text_type->set_disabled(!is_color_valid_hex(color));
|
text_type->set_disabled(!is_color_valid_hex(color));
|
||||||
hex_label->set_text(ETR("Expr"));
|
hex_label->set_text(ETR("Expr"));
|
||||||
c_text->set_text(t);
|
c_text->set_text(t);
|
||||||
|
c_text->set_tooltip_text(RTR("Execute an expression as a color."));
|
||||||
} else {
|
} else {
|
||||||
text_type->set_text("#");
|
text_type->set_text("#");
|
||||||
text_type->set_button_icon(nullptr);
|
text_type->set_button_icon(nullptr);
|
||||||
text_type->set_disabled(false);
|
text_type->set_disabled(false);
|
||||||
hex_label->set_text(ETR("Hex"));
|
hex_label->set_text(ETR("Hex"));
|
||||||
c_text->set_text(color.to_html(edit_alpha && color.a < 1));
|
c_text->set_text(color.to_html(edit_alpha && color.a < 1));
|
||||||
|
c_text->set_tooltip_text(ETR("Enter a hex code (\"#ff0000\") or named color (\"red\")."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue