aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/screens/WatchFacePineTimeStyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/screens/WatchFacePineTimeStyle.cpp')
-rw-r--r--src/displayapp/screens/WatchFacePineTimeStyle.cpp38
1 files changed, 2 insertions, 36 deletions
diff --git a/src/displayapp/screens/WatchFacePineTimeStyle.cpp b/src/displayapp/screens/WatchFacePineTimeStyle.cpp
index 4c28c62c..5259d553 100644
--- a/src/displayapp/screens/WatchFacePineTimeStyle.cpp
+++ b/src/displayapp/screens/WatchFacePineTimeStyle.cpp
@@ -27,6 +27,7 @@
#include "displayapp/screens/BleIcon.h"
#include "displayapp/screens/NotificationIcon.h"
#include "displayapp/screens/Symbols.h"
+#include "displayapp/screens/WeatherSymbols.h"
#include "components/battery/BatteryController.h"
#include "components/ble/BleController.h"
#include "components/ble/NotificationManager.h"
@@ -42,41 +43,6 @@ namespace {
auto* screen = static_cast<WatchFacePineTimeStyle*>(obj->user_data);
screen->UpdateSelected(obj, event);
}
-
- const char* GetIcon(const Pinetime::Controllers::SimpleWeatherService::Icons icon) {
- switch (icon) {
- case Pinetime::Controllers::SimpleWeatherService::Icons::Sun:
- return Symbols::sun;
- break;
- case Pinetime::Controllers::SimpleWeatherService::Icons::CloudsSun:
- return Symbols::cloudSun;
- break;
- case Pinetime::Controllers::SimpleWeatherService::Icons::Clouds:
- return Symbols::cloud;
- break;
- case Pinetime::Controllers::SimpleWeatherService::Icons::BrokenClouds:
- return Symbols::cloudMeatball;
- break;
- case Pinetime::Controllers::SimpleWeatherService::Icons::Thunderstorm:
- return Symbols::bolt;
- break;
- case Pinetime::Controllers::SimpleWeatherService::Icons::Snow:
- return Symbols::snowflake;
- break;
- case Pinetime::Controllers::SimpleWeatherService::Icons::CloudShowerHeavy:
- return Symbols::cloudShowersHeavy;
- break;
- case Pinetime::Controllers::SimpleWeatherService::Icons::CloudSunRain:
- return Symbols::cloudSunRain;
- break;
- case Pinetime::Controllers::SimpleWeatherService::Icons::Smog:
- return Symbols::smog;
- break;
- default:
- return Symbols::ban;
- break;
- }
- }
}
WatchFacePineTimeStyle::WatchFacePineTimeStyle(Controllers::DateTime& dateTimeController,
@@ -578,7 +544,7 @@ void WatchFacePineTimeStyle::Refresh() {
auto optCurrentWeather = currentWeather.Get();
if (optCurrentWeather) {
lv_label_set_text_fmt(temperature, "%d°", optCurrentWeather->temperature);
- lv_label_set_text(weatherIcon, GetIcon(optCurrentWeather->iconId));
+ lv_label_set_text(weatherIcon, Symbols::GetSymbol(optCurrentWeather->iconId));
lv_obj_realign(temperature);
lv_obj_realign(weatherIcon);
}