summaryrefslogtreecommitdiff
path: root/watchapp/src/watchapp.c
diff options
context:
space:
mode:
Diffstat (limited to 'watchapp/src/watchapp.c')
-rw-r--r--watchapp/src/watchapp.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/watchapp/src/watchapp.c b/watchapp/src/watchapp.c
index 8234b77..1765850 100644
--- a/watchapp/src/watchapp.c
+++ b/watchapp/src/watchapp.c
@@ -106,11 +106,12 @@ static void click_config_provider(void *context)
static void window_load(Window *window)
{
+ Layer *root_layer = window_get_root_layer(window);
window_set_fullscreen(window, true);
window_set_background_color(window, GColorBlack);
- GRect full = layer_get_bounds(window_get_root_layer(window));
+ GRect full = layer_get_bounds(root_layer);
full.size.h += 16; /* Account for status bar no longer shown */
- layer_set_bounds(window_get_root_layer(window), full);
+ layer_set_bounds(root_layer, full);
// Init the text layer used to show the time
time_layer = text_layer_create(GRect(4, 168-49-8, 144-4 /* width */, 49 /* height */));
text_layer_set_text_color(time_layer, GColorWhite);
@@ -151,12 +152,12 @@ static void window_load(Window *window)
layer_set_update_proc(line_layer, draw_line);
// And stuff the layers into the window
- layer_add_child(window_get_root_layer(window), text_layer_get_layer(time_layer));
- layer_add_child(window_get_root_layer(window), text_layer_get_layer(date_layer));
- layer_add_child(window_get_root_layer(window), text_layer_get_layer(step_layer));
- layer_add_child(window_get_root_layer(window), line_layer);
- layer_add_child(window_get_root_layer(window), bitmap_layer_get_layer(battery_layer));
- layer_add_child(window_get_root_layer(window), bitmap_layer_get_layer(mode_layer));
+ layer_add_child(root_layer, text_layer_get_layer(time_layer));
+ layer_add_child(root_layer, text_layer_get_layer(date_layer));
+ layer_add_child(root_layer, text_layer_get_layer(step_layer));
+ layer_add_child(root_layer, line_layer);
+ layer_add_child(root_layer, bitmap_layer_get_layer(battery_layer));
+ layer_add_child(root_layer, bitmap_layer_get_layer(mode_layer));
}
static void window_unload(Window *window)