window: add support for textual representation of background color

This commit is contained in:
Andrzej Rybczak
2014-11-09 00:41:09 +01:00
parent 5ff553005d
commit 448c87f850
4 changed files with 67 additions and 50 deletions

View File

@@ -50,28 +50,6 @@ NC::Color charToColor(char c)
}
}
NC::Color stringToColor(const std::string &color)
{
NC::Color result = NC::Color::Default;
if (color == "black")
result = NC::Color::Black;
else if (color == "red")
result = NC::Color::Red;
else if (color == "green")
result = NC::Color::Green;
else if (color == "yellow")
result = NC::Color::Yellow;
else if (color == "blue")
result = NC::Color::Blue;
else if (color == "magenta")
result = NC::Color::Magenta;
else if (color == "cyan")
result = NC::Color::Cyan;
else if (color == "white")
result = NC::Color::White;
return result;
}
NC::Border stringToBorder(const std::string &border)
{
NC::Border result = NC::Border::None;

View File

@@ -28,7 +28,6 @@
NC::Color charToColor(char c);
NC::Color stringToColor(const std::string &color);
NC::Border stringToBorder(const std::string &border);
std::string tagTypeToString(mpd_tag_type tag);