1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 00:47:36 +00:00

LibWeb: Serialize Resolution according to spec

This commit is contained in:
stelar7 2023-05-27 22:30:10 +02:00 committed by Andreas Kling
parent b6d767fbb0
commit 5cdeb994b2

View file

@ -22,7 +22,7 @@ Resolution::Resolution(float value, Type type)
ErrorOr<String> Resolution::to_string() const
{
return String::formatted("{}{}", m_value, unit_name());
return String::formatted("{}dppx", to_dots_per_pixel());
}
float Resolution::to_dots_per_pixel() const