summaryrefslogtreecommitdiff
path: root/src/displayapp/Colors.cpp
diff options
context:
space:
mode:
authorRiku Isokoski <riksu9000@gmail.com>2021-09-14 12:34:09 (GMT)
committerRiku Isokoski <riksu9000@gmail.com>2021-09-14 12:34:09 (GMT)
commitf221f5d7443aeac964615d43098dd6ed79ca62f0 (patch)
tree48c5ceaf3233f62736c1ee0936d7dbb47268042d /src/displayapp/Colors.cpp
parentd2d97319e0252ebd90fe1bbf4d3c7d8539711d56 (diff)
parent6356c7f276d09ab32d6f1c1338dac0b00a602232 (diff)
Merge branch 'develop' into update_touch_driver
Diffstat (limited to 'src/displayapp/Colors.cpp')
-rw-r--r--src/displayapp/Colors.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/displayapp/Colors.cpp b/src/displayapp/Colors.cpp
new file mode 100644
index 0000000..f45f072
--- /dev/null
+++ b/src/displayapp/Colors.cpp
@@ -0,0 +1,27 @@
+#include "Colors.h"
+
+using namespace Pinetime::Applications;
+using namespace Pinetime::Controllers;
+
+lv_color_t Pinetime::Applications::Convert(Pinetime::Controllers::Settings::Colors color) {
+ switch (color) {
+ case Pinetime::Controllers::Settings::Colors::White: return LV_COLOR_WHITE;
+ case Pinetime::Controllers::Settings::Colors::Silver: return LV_COLOR_SILVER;
+ case Pinetime::Controllers::Settings::Colors::Gray: return LV_COLOR_GRAY;
+ case Pinetime::Controllers::Settings::Colors::Black: return LV_COLOR_BLACK;
+ case Pinetime::Controllers::Settings::Colors::Red: return LV_COLOR_RED;
+ case Pinetime::Controllers::Settings::Colors::Maroon: return LV_COLOR_MAROON;
+ case Pinetime::Controllers::Settings::Colors::Yellow: return LV_COLOR_YELLOW;
+ case Pinetime::Controllers::Settings::Colors::Olive: return LV_COLOR_OLIVE;
+ case Pinetime::Controllers::Settings::Colors::Lime: return LV_COLOR_LIME;
+ case Pinetime::Controllers::Settings::Colors::Green: return LV_COLOR_GREEN;
+ case Pinetime::Controllers::Settings::Colors::Cyan: return LV_COLOR_CYAN;
+ case Pinetime::Controllers::Settings::Colors::Teal: return LV_COLOR_TEAL;
+ case Pinetime::Controllers::Settings::Colors::Blue: return LV_COLOR_BLUE;
+ case Pinetime::Controllers::Settings::Colors::Navy: return LV_COLOR_NAVY;
+ case Pinetime::Controllers::Settings::Colors::Magenta: return LV_COLOR_MAGENTA;
+ case Pinetime::Controllers::Settings::Colors::Purple: return LV_COLOR_PURPLE;
+ case Pinetime::Controllers::Settings::Colors::Orange: return LV_COLOR_ORANGE;
+ default: return LV_COLOR_WHITE;
+ }
+}