mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:57:35 +00:00
LibGUI: Make GUI::Variant stringify floats with 2 decimals
The extremely high default precision was obnoxious in user interfaces.
This commit is contained in:
parent
4a843f7405
commit
3dfc3e362b
1 changed files with 1 additions and 1 deletions
|
@ -404,7 +404,7 @@ String Variant::to_string() const
|
|||
case Type::UnsignedInt:
|
||||
return String::number(as_uint());
|
||||
case Type::Float:
|
||||
return String::formatted("{}", as_float());
|
||||
return String::formatted("{:.2}", as_float());
|
||||
case Type::String:
|
||||
return as_string();
|
||||
case Type::Bitmap:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue