aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Häggqvist <[email protected]>2015-11-21 20:52:52 +0100
committerVictor Häggqvist <[email protected]>2015-11-21 20:52:52 +0100
commit9027e0c9b3f0bb03555b67cd74a15bff8165faa9 (patch)
treed77ed3cc51c60436d318bebf4887994cb5b52a69
parentffd693f04766095502f2e2be5790837989e115f5 (diff)
add support for PTR
-rw-r--r--appinfo.json3
-rw-r--r--src/battery.c8
2 files changed, 10 insertions, 1 deletions
diff --git a/appinfo.json b/appinfo.json
index b821eb3..cb57a27 100644
--- a/appinfo.json
+++ b/appinfo.json
@@ -21,7 +21,8 @@
},
"targetPlatforms": [
"aplite",
- "basalt"
+ "basalt",
+ "chalk"
],
"sdkVersion": "3"
}
diff --git a/src/battery.c b/src/battery.c
index 390f3aa..dc93b81 100644
--- a/src/battery.c
+++ b/src/battery.c
@@ -77,12 +77,20 @@ void window_load(Window *window) {
Layer *window_layer = window_get_root_layer(window);
GRect bounds = layer_get_bounds(window_layer);
+#ifdef PBL_ROUND
+ battery_percentage = text_layer_create((GRect) { .origin = { 0, 55 }, .size = { bounds.size.w, 45 } });
+#else
battery_percentage = text_layer_create((GRect) { .origin = { 0, 32 }, .size = { bounds.size.w, 45 } });
+#endif
text_layer_set_text_alignment(battery_percentage, GTextAlignmentCenter);
text_layer_set_font(battery_percentage, fonts_get_system_font(FONT_KEY_BITHAM_42_BOLD));
text_layer_set_background_color(battery_percentage, GColorClear);
+#ifdef PBL_ROUND
+ charge_status = text_layer_create((GRect) { .origin = { 0, 102 }, .size = { bounds.size.w, 20 } });
+#else
charge_status = text_layer_create((GRect) { .origin = { 0, 82 }, .size = { bounds.size.w, 20 } });
+#endif
text_layer_set_text_alignment(charge_status, GTextAlignmentCenter);
text_layer_set_background_color(charge_status, GColorClear);