summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-04-12 14:49:45 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-04-12 14:49:45 +0200
commit3674bb942979314e1dd3dd58a59a4043f715a392 (patch)
tree29fec89e1e39f637bc8de8e69473d8dc9c811135
parent6f90f41516e4fc39ad08ab65520c9aab081c313d (diff)
downloadserenity-3674bb942979314e1dd3dd58a59a4043f715a392.zip
GVariant: Tweak stringification of Color, Boolean and Invalid variants.
-rw-r--r--LibGUI/GVariant.cpp4
-rw-r--r--SharedGraphics/Color.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/LibGUI/GVariant.cpp b/LibGUI/GVariant.cpp
index 196249d8a0..b61f08953d 100644
--- a/LibGUI/GVariant.cpp
+++ b/LibGUI/GVariant.cpp
@@ -216,7 +216,7 @@ String GVariant::to_string() const
{
switch (m_type) {
case Type::Bool:
- return as_bool() ? "True" : "False";
+ return as_bool() ? "true" : "false";
case Type::Int:
return String::format("%d", as_int());
case Type::Float:
@@ -236,7 +236,7 @@ String GVariant::to_string() const
case Type::Rect:
return as_rect().to_string();
case Type::Invalid:
- return "[Null]";
+ return "[null]";
break;
}
ASSERT_NOT_REACHED();
diff --git a/SharedGraphics/Color.cpp b/SharedGraphics/Color.cpp
index bb66a2af1f..4636e29f04 100644
--- a/SharedGraphics/Color.cpp
+++ b/SharedGraphics/Color.cpp
@@ -35,5 +35,5 @@ Color::Color(NamedColor named)
String Color::to_string() const
{
- return String::format("rgba(%d, %d, %d, %d)", red(), green(), blue(), alpha());
+ return String::format("#%b%b%b%b", red(), green(), blue(), alpha());
}