aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp')
-rw-r--r--src/displayapp/fonts/fonts.json2
-rw-r--r--src/displayapp/screens/Symbols.h3
-rw-r--r--src/displayapp/screens/WatchFaceDigital.cpp2
-rw-r--r--src/displayapp/screens/WatchFacePineTimeStyle.cpp2
-rw-r--r--src/displayapp/screens/Weather.cpp4
-rw-r--r--src/displayapp/screens/WeatherSymbols.cpp12
-rw-r--r--src/displayapp/screens/WeatherSymbols.h2
7 files changed, 20 insertions, 7 deletions
diff --git a/src/displayapp/fonts/fonts.json b/src/displayapp/fonts/fonts.json
index 90be1feb..3221c2f1 100644
--- a/src/displayapp/fonts/fonts.json
+++ b/src/displayapp/fonts/fonts.json
@@ -68,7 +68,7 @@
"sources": [
{
"file": "FontAwesome5-Solid+Brands+Regular.woff",
- "range": "0xf185, 0xf6c4, 0xf743, 0xf740, 0xf75f, 0xf0c2, 0xf05e, 0xf73b, 0xf0e7, 0xf2dc"
+ "range": "0xf185, 0xf186, 0xf6c3, 0xf6c4, 0xf73c, 0xf743, 0xf740, 0xf75f, 0xf0c2, 0xf05e, 0xf73b, 0xf0e7, 0xf2dc"
}
],
"bpp": 1,
diff --git a/src/displayapp/screens/Symbols.h b/src/displayapp/screens/Symbols.h
index fb93e80e..058b2d06 100644
--- a/src/displayapp/screens/Symbols.h
+++ b/src/displayapp/screens/Symbols.h
@@ -45,8 +45,11 @@ namespace Pinetime {
// fontawesome_weathericons.c
// static constexpr const char* sun = "\xEF\x86\x85";
+ static constexpr const char* moon = "\xEF\x86\x86"; // 0xf186
static constexpr const char* cloudSun = "\xEF\x9B\x84";
+ static constexpr const char* cloudMoon = "\xEF\x9B\x83"; // 0xf6c3
static constexpr const char* cloudSunRain = "\xEF\x9D\x83";
+ static constexpr const char* cloudMoonRain = "\xEF\x9C\xBC"; // 0xf73c
static constexpr const char* cloudShowersHeavy = "\xEF\x9D\x80";
static constexpr const char* smog = "\xEF\x9D\x9F";
static constexpr const char* cloud = "\xEF\x83\x82";
diff --git a/src/displayapp/screens/WatchFaceDigital.cpp b/src/displayapp/screens/WatchFaceDigital.cpp
index 3163c6e7..a037abfe 100644
--- a/src/displayapp/screens/WatchFaceDigital.cpp
+++ b/src/displayapp/screens/WatchFaceDigital.cpp
@@ -183,7 +183,7 @@ void WatchFaceDigital::Refresh() {
tempUnit = 'F';
}
lv_label_set_text_fmt(temperature, "%d°%c", temp, tempUnit);
- lv_label_set_text(weatherIcon, Symbols::GetSymbol(optCurrentWeather->iconId));
+ lv_label_set_text(weatherIcon, Symbols::GetSymbol(optCurrentWeather->iconId, weatherService.IsNight()));
} else {
lv_label_set_text_static(temperature, "");
lv_label_set_text(weatherIcon, "");
diff --git a/src/displayapp/screens/WatchFacePineTimeStyle.cpp b/src/displayapp/screens/WatchFacePineTimeStyle.cpp
index ce8f8f7e..bfbbe24b 100644
--- a/src/displayapp/screens/WatchFacePineTimeStyle.cpp
+++ b/src/displayapp/screens/WatchFacePineTimeStyle.cpp
@@ -548,7 +548,7 @@ void WatchFacePineTimeStyle::Refresh() {
temp = optCurrentWeather->temperature.Fahrenheit();
}
lv_label_set_text_fmt(temperature, "%d°", temp);
- lv_label_set_text(weatherIcon, Symbols::GetSymbol(optCurrentWeather->iconId));
+ lv_label_set_text(weatherIcon, Symbols::GetSymbol(optCurrentWeather->iconId, weatherService.IsNight()));
} else {
lv_label_set_text(temperature, "--");
lv_label_set_text(weatherIcon, Symbols::ban);
diff --git a/src/displayapp/screens/Weather.cpp b/src/displayapp/screens/Weather.cpp
index 0e44df03..de32a153 100644
--- a/src/displayapp/screens/Weather.cpp
+++ b/src/displayapp/screens/Weather.cpp
@@ -118,7 +118,7 @@ void Weather::Refresh() {
tempUnit = 'F';
}
lv_obj_set_style_local_text_color(temperature, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, optCurrentWeather->temperature.Color());
- lv_label_set_text(icon, Symbols::GetSymbol(optCurrentWeather->iconId));
+ lv_label_set_text(icon, Symbols::GetSymbol(optCurrentWeather->iconId, weatherService.IsNight()));
lv_label_set_text(condition, Symbols::GetCondition(optCurrentWeather->iconId));
lv_label_set_text_fmt(temperature, "%d°%c", temp, tempUnit);
lv_label_set_text_fmt(minTemperature, "%d°", minTemp);
@@ -154,7 +154,7 @@ void Weather::Refresh() {
}
const char* dayOfWeek = Controllers::DateTime::DayOfWeekShortToStringLow(static_cast<Controllers::DateTime::Days>(wday));
lv_table_set_cell_value(forecast, 0, i, dayOfWeek);
- lv_table_set_cell_value(forecast, 1, i, Symbols::GetSymbol(optCurrentForecast->days[i]->iconId));
+ lv_table_set_cell_value(forecast, 1, i, Symbols::GetSymbol(optCurrentForecast->days[i]->iconId, false));
// Pad cells based on the largest number of digits on each column
char maxPadding[3] = " ";
char minPadding[3] = " ";
diff --git a/src/displayapp/screens/WeatherSymbols.cpp b/src/displayapp/screens/WeatherSymbols.cpp
index 0a963bc6..762180c7 100644
--- a/src/displayapp/screens/WeatherSymbols.cpp
+++ b/src/displayapp/screens/WeatherSymbols.cpp
@@ -1,11 +1,18 @@
#include "displayapp/screens/WeatherSymbols.h"
-const char* Pinetime::Applications::Screens::Symbols::GetSymbol(const Pinetime::Controllers::SimpleWeatherService::Icons icon) {
+const char* Pinetime::Applications::Screens::Symbols::GetSymbol(const Pinetime::Controllers::SimpleWeatherService::Icons icon,
+ const bool isNight) {
switch (icon) {
case Pinetime::Controllers::SimpleWeatherService::Icons::Sun:
+ if (isNight) {
+ return Symbols::moon;
+ }
return Symbols::sun;
break;
case Pinetime::Controllers::SimpleWeatherService::Icons::CloudsSun:
+ if (isNight) {
+ return Symbols::cloudMoon;
+ }
return Symbols::cloudSun;
break;
case Pinetime::Controllers::SimpleWeatherService::Icons::Clouds:
@@ -24,6 +31,9 @@ const char* Pinetime::Applications::Screens::Symbols::GetSymbol(const Pinetime::
return Symbols::cloudShowersHeavy;
break;
case Pinetime::Controllers::SimpleWeatherService::Icons::CloudSunRain:
+ if (isNight) {
+ return Symbols::cloudMoonRain;
+ }
return Symbols::cloudSunRain;
break;
case Pinetime::Controllers::SimpleWeatherService::Icons::Smog:
diff --git a/src/displayapp/screens/WeatherSymbols.h b/src/displayapp/screens/WeatherSymbols.h
index 0fed0bdc..15c8a8a3 100644
--- a/src/displayapp/screens/WeatherSymbols.h
+++ b/src/displayapp/screens/WeatherSymbols.h
@@ -6,7 +6,7 @@ namespace Pinetime {
namespace Applications {
namespace Screens {
namespace Symbols {
- const char* GetSymbol(const Pinetime::Controllers::SimpleWeatherService::Icons icon);
+ const char* GetSymbol(const Pinetime::Controllers::SimpleWeatherService::Icons icon, const bool isNight);
const char* GetCondition(const Pinetime::Controllers::SimpleWeatherService::Icons icon);
const char* GetSimpleCondition(const Pinetime::Controllers::SimpleWeatherService::Icons icon);
}