Skip to content

Commit b94227a

Browse files
shalehOlivier ROMAN
authored andcommitted
Working and updated with main.
1 parent 2e47337 commit b94227a

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

src/displayapp/screens/WatchFacePrideFlag.cpp

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ namespace {
3737
template <std::size_t N>
3838
class PrideFlagData {
3939
public:
40-
constexpr PrideFlagData(const std::array<lv_color_t, N>& sectionColours,
41-
lv_color_t defaultTopLabelColour,
42-
lv_color_t labelTimeColour,
43-
lv_color_t defaultBottomLabelColour)
40+
constexpr PrideFlagData(const std::array<Colors::Color, N>& sectionColours,
41+
Colors::Color defaultTopLabelColour,
42+
Colors::Color labelTimeColour,
43+
Colors::Color defaultBottomLabelColour)
4444
: sectionColours {sectionColours},
4545
defaultTopLabelColour {defaultTopLabelColour},
4646
labelTimeColour {labelTimeColour},
@@ -49,36 +49,36 @@ namespace {
4949
spacing = static_cast<uint8_t>(1.5f * static_cast<float>(N) + 40.5f);
5050
}
5151

52-
std::array<lv_color_t, N> sectionColours;
53-
lv_color_t defaultTopLabelColour;
54-
lv_color_t labelTimeColour;
55-
lv_color_t defaultBottomLabelColour;
52+
std::array<Colors::Color, N> sectionColours;
53+
Colors::Color defaultTopLabelColour;
54+
Colors::Color labelTimeColour;
55+
Colors::Color defaultBottomLabelColour;
5656
uint8_t spacing;
5757
};
5858

59-
constexpr lv_color_t lightBlue = LV_COLOR_MAKE(0x00, 0xbf, 0xf3);
60-
constexpr lv_color_t lightPink = LV_COLOR_MAKE(0xf4, 0x9a, 0xc1);
61-
constexpr lv_color_t hotPink = LV_COLOR_MAKE(0xd6, 0x02, 0x70);
62-
constexpr lv_color_t grayPurple = LV_COLOR_MAKE(0x9b, 0x4f, 0x96);
63-
constexpr lv_color_t darkBlue = LV_COLOR_MAKE(0x00, 0x38, 0xa8);
64-
constexpr lv_color_t orange = LV_COLOR_MAKE(0xef, 0x76, 0x27);
65-
constexpr lv_color_t lightOrange = LV_COLOR_MAKE(0xff, 0x9b, 0x55);
66-
constexpr lv_color_t lightPurple = LV_COLOR_MAKE(0xd4, 0x61, 0xa6);
67-
constexpr lv_color_t darkPurple = LV_COLOR_MAKE(0xb5, 0x56, 0x90);
68-
constexpr lv_color_t magenta = LV_COLOR_MAKE(0xa5, 0x00, 0x62);
69-
constexpr lv_color_t darkGreen = LV_COLOR_MAKE(0x07, 0x8d, 0x70);
70-
constexpr lv_color_t cyan = LV_COLOR_MAKE(0x26, 0xce, 0xaa);
71-
constexpr lv_color_t lightGreen = LV_COLOR_MAKE(0x98, 0xe8, 0xc1);
72-
constexpr lv_color_t indigo = LV_COLOR_MAKE(0x50, 0x49, 0xcc);
73-
constexpr lv_color_t steelBlue = LV_COLOR_MAKE(0x3d, 0x1a, 0x78);
74-
constexpr std::array<lv_color_t, 7> gayColours {darkGreen, cyan, lightGreen, LV_COLOR_WHITE, lightBlue, indigo, steelBlue};
75-
constexpr std::array<lv_color_t, 5> transColours {lightBlue, lightPink, LV_COLOR_WHITE, lightPink, lightBlue};
76-
constexpr std::array<lv_color_t, 5> biColours {hotPink, hotPink, grayPurple, darkBlue, darkBlue};
77-
constexpr std::array<lv_color_t, 7> lesbianColours {LV_COLOR_RED, orange, lightOrange, LV_COLOR_WHITE, lightPurple, darkPurple, magenta};
78-
constexpr PrideFlagData gayFlagData(gayColours, LV_COLOR_BLACK, LV_COLOR_BLACK, LV_COLOR_WHITE);
79-
constexpr PrideFlagData transFlagData(transColours, LV_COLOR_WHITE, LV_COLOR_BLACK, LV_COLOR_WHITE);
80-
constexpr PrideFlagData biFlagData(biColours, LV_COLOR_BLACK, LV_COLOR_WHITE, LV_COLOR_BLACK);
81-
constexpr PrideFlagData lesbianFlagData(lesbianColours, LV_COLOR_WHITE, LV_COLOR_BLACK, LV_COLOR_WHITE);
59+
constexpr Colors::Color lightBlue = 0x00bff3;
60+
constexpr Colors::Color lightPink = 0xf49ac1;
61+
constexpr Colors::Color hotPink = 0xd60270;
62+
constexpr Colors::Color grayPurple = 0x9b4f96;
63+
constexpr Colors::Color darkBlue = 0x0038a8;
64+
constexpr Colors::Color orange = 0xef7627;
65+
constexpr Colors::Color lightOrange = 0xff9b55;
66+
constexpr Colors::Color lightPurple = 0xd461a6;
67+
constexpr Colors::Color darkPurple = 0xb55690;
68+
constexpr Colors::Color magenta = 0xa50062;
69+
constexpr Colors::Color darkGreen = 0x078d70;
70+
constexpr Colors::Color cyan = 0x26ceaa;
71+
constexpr Colors::Color lightGreen = 0x98e8c1;
72+
constexpr Colors::Color indigo = 0x5049cc;
73+
constexpr Colors::Color steelBlue = 0x3d1a78;
74+
constexpr std::array<Colors::Color, 7> gayColours {darkGreen, cyan, lightGreen, Colors::White, lightBlue, indigo, steelBlue};
75+
constexpr std::array<Colors::Color, 5> transColours {lightBlue, lightPink, Colors::White, lightPink, lightBlue};
76+
constexpr std::array<Colors::Color, 5> biColours {hotPink, hotPink, grayPurple, darkBlue, darkBlue};
77+
constexpr std::array<Colors::Color, 7> lesbianColours {Colors::Red, orange, lightOrange, Colors::White, lightPurple, darkPurple, magenta};
78+
constexpr PrideFlagData gayFlagData(gayColours, Colors::Black, Colors::Black, Colors::White);
79+
constexpr PrideFlagData transFlagData(transColours, Colors::White, Colors::Black, Colors::White);
80+
constexpr PrideFlagData biFlagData(biColours, Colors::Black, Colors::White, Colors::Black);
81+
constexpr PrideFlagData lesbianFlagData(lesbianColours, Colors::White, Colors::Black, Colors::White);
8282
}
8383

8484
WatchFacePrideFlag::WatchFacePrideFlag(Controllers::DateTime& dateTimeController,
@@ -106,7 +106,7 @@ WatchFacePrideFlag::WatchFacePrideFlag(Controllers::DateTime& dateTimeController
106106

107107
notificationText = lv_label_create(lv_scr_act(), nullptr);
108108
lv_obj_align(notificationText, nullptr, LV_ALIGN_IN_LEFT_MID, 0, -110);
109-
lv_obj_set_style_local_text_color(notificationText, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_BLACK);
109+
lv_obj_set_style_local_text_color(notificationText, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::Black);
110110

111111
btnClose = lv_btn_create(lv_scr_act(), nullptr);
112112
btnClose->user_data = this;

0 commit comments

Comments
 (0)