Merge pull request #75904 from Calinou/colorpicker-constructor-round-values
Round values to 3 decimals in the ColorPicker constructor string
This commit is contained in:
commit
87b8eea9f6
1 changed files with 2 additions and 2 deletions
|
|
@ -967,9 +967,9 @@ bool ColorPicker::is_deferred_mode() const {
|
|||
void ColorPicker::_update_text_value() {
|
||||
bool text_visible = true;
|
||||
if (text_is_constructor) {
|
||||
String t = "Color(" + String::num(color.r) + ", " + String::num(color.g) + ", " + String::num(color.b);
|
||||
String t = "Color(" + String::num(color.r, 3) + ", " + String::num(color.g, 3) + ", " + String::num(color.b, 3);
|
||||
if (edit_alpha && color.a < 1) {
|
||||
t += ", " + String::num(color.a) + ")";
|
||||
t += ", " + String::num(color.a, 3) + ")";
|
||||
} else {
|
||||
t += ")";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue