Skip to content

Commit 590e6f6

Browse files
committed
Updated the calendar to use colors from the InfiniTimeTheme.h's Colors namespace
1 parent 6c4ac35 commit 590e6f6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/displayapp/InfiniTimeTheme.h

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace Colors {
88
static constexpr lv_color_t green = LV_COLOR_MAKE(0x0, 0xb0, 0x0);
99
static constexpr lv_color_t blue = LV_COLOR_MAKE(0x0, 0x50, 0xff);
1010
static constexpr lv_color_t lightGray = LV_COLOR_MAKE(0xb0, 0xb0, 0xb0);
11+
static constexpr lv_color_t gray = LV_COLOR_MAKE(0x50, 0x50, 0x50);
1112

1213
static constexpr lv_color_t bg = LV_COLOR_MAKE(0x5d, 0x69, 0x7e);
1314
static constexpr lv_color_t bgAlt = LV_COLOR_MAKE(0x38, 0x38, 0x38);

src/displayapp/screens/Calendar.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include "displayapp/screens/Calendar.h"
2020
#include "components/datetime/DateTimeController.h"
21+
#include "displayapp/InfiniTimeTheme.h"
2122

2223
using namespace Pinetime::Applications::Screens;
2324

@@ -33,10 +34,10 @@ Calendar::Calendar(Controllers::DateTime& dateTimeController) : dateTimeControll
3334
lv_obj_set_click(calendar, false);
3435

3536
// Set style of today's date
36-
lv_obj_set_style_local_text_color(calendar, LV_CALENDAR_PART_DATE, LV_STATE_FOCUSED, LV_COLOR_RED);
37+
lv_obj_set_style_local_text_color(calendar, LV_CALENDAR_PART_DATE, LV_STATE_FOCUSED, Colors::deepOrange);
3738

3839
// Set style of inactive month's days
39-
lv_obj_set_style_local_text_color(calendar, LV_CALENDAR_PART_DATE, LV_STATE_DISABLED, lv_color_hex(0x505050));
40+
lv_obj_set_style_local_text_color(calendar, LV_CALENDAR_PART_DATE, LV_STATE_DISABLED, Colors::gray);
4041

4142
// Get today's date
4243
current.year = static_cast<int>(dateTimeController.Year());

0 commit comments

Comments
 (0)