diff --git a/doc/gettingStarted/Watchfaces.md b/doc/gettingStarted/Watchfaces.md index 9edff0bb51..2d888eae0f 100644 --- a/doc/gettingStarted/Watchfaces.md +++ b/doc/gettingStarted/Watchfaces.md @@ -29,3 +29,7 @@ InfiniTime has 6 apps on the `main` branch at the time of writing. ### Casio G7710 ![Casio G7710 face](/doc/gettingStarted/Watchfaces/CasioG7710.png) + +### Pride Flag +![Pride flag face](/doc/gettingStarted/Watchfaces/Pride.png) + - You can long-press on the display to change flags. (Gay, Lesbian, Bi, Trans, Non-binary) \ No newline at end of file diff --git a/doc/gettingStarted/Watchfaces/Pride.png b/doc/gettingStarted/Watchfaces/Pride.png new file mode 100644 index 0000000000..7e97295cea Binary files /dev/null and b/doc/gettingStarted/Watchfaces/Pride.png differ diff --git a/src/components/settings/Settings.h b/src/components/settings/Settings.h index 9133d3fea1..93b484336d 100644 --- a/src/components/settings/Settings.h +++ b/src/components/settings/Settings.h @@ -39,7 +39,7 @@ namespace Pinetime { }; enum class PTSGaugeStyle : uint8_t { Full, Half, Numeric }; enum class PTSWeather : uint8_t { On, Off }; - enum class PrideFlag : uint8_t { Gay, Trans, Bi, Lesbian }; + enum class PrideFlag : uint8_t { Gay, Trans, Bi, Lesbian, Nonbinary, Ace, Aro, AroAce, Pan }; enum class DfuAndFsMode : uint8_t { Disabled, Enabled, EnabledTillReboot }; struct PineTimeStyle { diff --git a/src/displayapp/screens/WatchFacePrideFlag.cpp b/src/displayapp/screens/WatchFacePrideFlag.cpp index e029c076f4..9231e4a99a 100644 --- a/src/displayapp/screens/WatchFacePrideFlag.cpp +++ b/src/displayapp/screens/WatchFacePrideFlag.cpp @@ -3,6 +3,8 @@ #include "components/battery/BatteryController.h" #include "components/ble/BleController.h" #include "displayapp/screens/Symbols.h" +#include "drivers/Bma421_C/bma4_defs.h" +#include "lvgl/src/lv_misc/lv_color.h" using namespace Pinetime::Applications::Screens; @@ -15,7 +17,7 @@ namespace { Pinetime::Controllers::Settings::PrideFlag GetNext(Pinetime::Controllers::Settings::PrideFlag prideFlag) { const auto prideFlagAsInt = static_cast(prideFlag); Pinetime::Controllers::Settings::PrideFlag nextFlag; - if (prideFlagAsInt < 3) { + if (prideFlagAsInt < 8) { nextFlag = static_cast(prideFlagAsInt + 1); } else { nextFlag = static_cast(0); @@ -29,7 +31,7 @@ namespace { if (prideFlagAsInt > 0) { prevFlag = static_cast(prideFlagAsInt - 1); } else { - prevFlag = static_cast(3); + prevFlag = static_cast(8); } return prevFlag; } @@ -62,6 +64,8 @@ namespace { constexpr lv_color_t grayPurple = LV_COLOR_MAKE(0x9b, 0x4f, 0x96); constexpr lv_color_t darkBlue = LV_COLOR_MAKE(0x00, 0x38, 0xa8); constexpr lv_color_t orange = LV_COLOR_MAKE(0xef, 0x76, 0x27); + constexpr lv_color_t sunOrange = LV_COLOR_MAKE(0xe2, 0x8c, 0x00); + constexpr lv_color_t brightYellow = LV_COLOR_MAKE(0xec, 0xcd, 0x00); constexpr lv_color_t lightOrange = LV_COLOR_MAKE(0xff, 0x9b, 0x55); constexpr lv_color_t lightPurple = LV_COLOR_MAKE(0xd4, 0x61, 0xa6); constexpr lv_color_t darkPurple = LV_COLOR_MAKE(0xb5, 0x56, 0x90); @@ -71,14 +75,29 @@ namespace { constexpr lv_color_t lightGreen = LV_COLOR_MAKE(0x98, 0xe8, 0xc1); constexpr lv_color_t indigo = LV_COLOR_MAKE(0x50, 0x49, 0xcc); constexpr lv_color_t steelBlue = LV_COLOR_MAKE(0x3d, 0x1a, 0x78); + constexpr lv_color_t skyBlue = LV_COLOR_MAKE(0x4a, 0x91, 0xe8); constexpr std::array gayColours {darkGreen, cyan, lightGreen, LV_COLOR_WHITE, lightBlue, indigo, steelBlue}; constexpr std::array transColours {lightBlue, lightPink, LV_COLOR_WHITE, lightPink, lightBlue}; constexpr std::array biColours {hotPink, hotPink, grayPurple, darkBlue, darkBlue}; constexpr std::array lesbianColours {LV_COLOR_RED, orange, lightOrange, LV_COLOR_WHITE, lightPurple, darkPurple, magenta}; + constexpr std::array nonbinaryColours {LV_COLOR_YELLOW, LV_COLOR_WHITE, LV_COLOR_PURPLE, LV_COLOR_BLACK}; + constexpr std::array aceColours {LV_COLOR_BLACK, LV_COLOR_GRAY, LV_COLOR_WHITE, LV_COLOR_PURPLE}; + constexpr std::array aroColours {LV_COLOR_GREEN, lightGreen, LV_COLOR_WHITE, LV_COLOR_GRAY, LV_COLOR_BLACK}; + constexpr std::array aroaceColours {sunOrange, + brightYellow, + LV_COLOR_WHITE, + LV_COLOR_MAKE(0x62, 0xae, 0xdc), + LV_COLOR_MAKE(0x20, 0x38, 0x56)}; + constexpr std::array panColours {hotPink, LV_COLOR_YELLOW, skyBlue}; constexpr PrideFlagData gayFlagData(gayColours, LV_COLOR_BLACK, LV_COLOR_BLACK, LV_COLOR_WHITE); constexpr PrideFlagData transFlagData(transColours, LV_COLOR_WHITE, LV_COLOR_BLACK, LV_COLOR_WHITE); constexpr PrideFlagData biFlagData(biColours, LV_COLOR_BLACK, LV_COLOR_WHITE, LV_COLOR_BLACK); constexpr PrideFlagData lesbianFlagData(lesbianColours, LV_COLOR_WHITE, LV_COLOR_BLACK, LV_COLOR_WHITE); + constexpr PrideFlagData nonbinaryFlagData(nonbinaryColours, skyBlue, lightPink, skyBlue); + constexpr PrideFlagData aceFlagData(aceColours, LV_COLOR_WHITE, LV_COLOR_BLACK, LV_COLOR_BLACK); + constexpr PrideFlagData aroFlagData(aroColours, LV_COLOR_WHITE, LV_COLOR_BLACK, LV_COLOR_WHITE); + constexpr PrideFlagData aroaceFlagData(aroaceColours, LV_COLOR_WHITE, LV_COLOR_BLACK, LV_COLOR_WHITE); + constexpr PrideFlagData panFlagData(panColours, LV_COLOR_BLACK, LV_COLOR_BLACK, LV_COLOR_BLACK); } WatchFacePrideFlag::WatchFacePrideFlag(Controllers::DateTime& dateTimeController, @@ -333,5 +352,20 @@ void WatchFacePrideFlag::UpdateScreen(const Pinetime::Controllers::Settings::Pri case Pinetime::Controllers::Settings::PrideFlag::Lesbian: UseFlagData(lesbianFlagData); break; + case Pinetime::Controllers::Settings::PrideFlag::Nonbinary: + UseFlagData(nonbinaryFlagData); + break; + case Pinetime::Controllers::Settings::PrideFlag::Ace: + UseFlagData(aceFlagData); + break; + case Pinetime::Controllers::Settings::PrideFlag::Aro: + UseFlagData(aroFlagData); + break; + case Pinetime::Controllers::Settings::PrideFlag::AroAce: + UseFlagData(aroaceFlagData); + break; + case Pinetime::Controllers::Settings::PrideFlag::Pan: + UseFlagData(panFlagData); + break; } }