diff --git a/resources-base/check.svg b/resources-base/check.svg
index d7f8b22..9ef2773 100644
--- a/resources-base/check.svg
+++ b/resources-base/check.svg
@@ -1,5 +1,53 @@
-
\ No newline at end of file
+
diff --git a/resources-base/clock.svg b/resources-base/clock.svg
index 24e8741..1013b92 100644
--- a/resources-base/clock.svg
+++ b/resources-base/clock.svg
@@ -27,8 +27,8 @@
inkscape:zoom="12.586501"
inkscape:cx="20.02145"
inkscape:cy="24.748737"
- inkscape:window-width="1524"
- inkscape:window-height="793"
+ inkscape:window-width="3056"
+ inkscape:window-height="1631"
inkscape:window-x="20"
inkscape:window-y="20"
inkscape:window-maximized="0"
@@ -138,7 +138,7 @@
y2="27.5"
id="line6"
inkscape:label="minuteHand"
- inkscape:export-filename="../resources/clock50~color.png"
- inkscape:export-xdpi="115.67793"
- inkscape:export-ydpi="115.67793" />
+ inkscape:export-filename="../resources/clock35~color.png"
+ inkscape:export-xdpi="80.974548"
+ inkscape:export-ydpi="80.974548" />
diff --git a/src/c/main.c b/src/c/main.c
index df5c091..4baf115 100644
--- a/src/c/main.c
+++ b/src/c/main.c
@@ -6,6 +6,8 @@ static Layer *s_top_bar_layer;
static Layer *s_bottom_bar_layer;
static BitmapLayer *s_clock_bmp_layer;
static BitmapLayer *s_check_bmp_layer;
+static TextLayer *s_remaining_txt_layer;
+static TextLayer *s_setter_txt_layer;
// bitmaps
static GBitmap *s_clock_bmp;
@@ -30,16 +32,16 @@ static void rect_fill_layer_update_proc(Layer *layer, GContext *ctx) {
static void setter_window_load() {
// top&bottom bars
- GRect top_bar_grect = GRect(0, 0, PBL_DISPLAY_WIDTH, s_edge_bar_height);
+ static const GRect top_bar_grect = GRect(0, 0, PBL_DISPLAY_WIDTH, s_edge_bar_height);
s_top_bar_layer = layer_create(top_bar_grect);
layer_set_update_proc(s_top_bar_layer, rect_fill_layer_update_proc);
- GRect bottom_bar_grect = GRect(0, PBL_DISPLAY_HEIGHT - s_edge_bar_height, PBL_DISPLAY_WIDTH, s_edge_bar_height);
+ static const GRect bottom_bar_grect = GRect(0, PBL_DISPLAY_HEIGHT - s_edge_bar_height, PBL_DISPLAY_WIDTH, s_edge_bar_height);
s_bottom_bar_layer = layer_create(bottom_bar_grect);
layer_set_update_proc(s_bottom_bar_layer, rect_fill_layer_update_proc);
// clock icon
s_clock_bmp = gbitmap_create_with_resource(RESOURCE_ID_CLOCK35);
- s_clock_bmp_layer = bitmap_layer_create(GRect(PBL_IF_ROUND_ELSE(0, 8), PBL_IF_ROUND_ELSE(8, 0), top_bar_grect.size.w, top_bar_grect.size.h));
+ s_clock_bmp_layer = bitmap_layer_create(GRect(PBL_IF_ROUND_ELSE(0, 8), PBL_IF_ROUND_ELSE(6, 0), top_bar_grect.size.w, top_bar_grect.size.h));
bitmap_layer_set_bitmap(s_clock_bmp_layer, s_clock_bmp);
bitmap_layer_set_alignment(s_clock_bmp_layer, PBL_IF_ROUND_ELSE(GAlignTop, GAlignLeft));
bitmap_layer_set_compositing_mode(s_clock_bmp_layer, GCompOpSet);
@@ -50,14 +52,33 @@ static void setter_window_load() {
bitmap_layer_set_bitmap(s_check_bmp_layer, s_check_bmp);
bitmap_layer_set_compositing_mode(s_check_bmp_layer, GCompOpSet);
+ // remaining time
+ s_remaining_txt_layer = text_layer_create(GRect(PBL_IF_ROUND_ELSE(0, 39), PBL_IF_ROUND_ELSE(37, (top_bar_grect.size.h / 2) - (top_bar_grect.size.h / 3)), PBL_IF_ROUND_ELSE(top_bar_grect.size.w, top_bar_grect.size.w - 39), 32));
+ text_layer_set_text_alignment(s_remaining_txt_layer, GTextAlignmentCenter);
+ text_layer_set_text_color(s_remaining_txt_layer, GColorWhite);
+ text_layer_set_background_color(s_remaining_txt_layer, GColorClear);
+ text_layer_set_font(s_remaining_txt_layer, fonts_get_system_font(FONT_KEY_LECO_32_BOLD_NUMBERS));
+ text_layer_set_text(s_remaining_txt_layer, "00:00:00");
+
+ // setter
+ s_setter_txt_layer = text_layer_create(GRect(0, (PBL_DISPLAY_HEIGHT / 2) - 39, PBL_DISPLAY_WIDTH, 60));
+ text_layer_set_text_alignment(s_setter_txt_layer, GTextAlignmentCenter);
+ text_layer_set_background_color(s_setter_txt_layer, GColorClear);
+ text_layer_set_font(s_setter_txt_layer, fonts_get_system_font(FONT_KEY_LECO_60_NUMBERS_AM_PM));
+ text_layer_set_text(s_setter_txt_layer, PBL_IF_ROUND_ELSE("00 : 00", "00:00"));
+
Layer *window_layer = window_get_root_layer(s_window);
layer_add_child(window_layer, s_top_bar_layer);
layer_add_child(window_layer, s_bottom_bar_layer);
layer_add_child(window_layer, bitmap_layer_get_layer(s_clock_bmp_layer));
layer_add_child(window_layer, bitmap_layer_get_layer(s_check_bmp_layer));
+ layer_add_child(window_layer, text_layer_get_layer(s_remaining_txt_layer));
+ layer_add_child(window_layer, text_layer_get_layer(s_setter_txt_layer));
}
static void setter_window_unload() {
+ text_layer_destroy(s_setter_txt_layer);
+ text_layer_destroy(s_remaining_txt_layer);
bitmap_layer_destroy(s_check_bmp_layer);
bitmap_layer_destroy(s_clock_bmp_layer);
gbitmap_destroy(s_check_bmp);