Fix sleep time alignment on rectangular platforms
This commit is contained in:
@@ -147,11 +147,11 @@ static void main_window_load(Window *window) {
|
|||||||
|
|
||||||
s_last_watched_layer = text_layer_create(GRect(0, 0, 0, 0)); // placeholder, updated when layer is written to
|
s_last_watched_layer = text_layer_create(GRect(0, 0, 0, 0)); // placeholder, updated when layer is written to
|
||||||
#if PBL_DISPLAY_WIDTH >= 200
|
#if PBL_DISPLAY_WIDTH >= 200
|
||||||
s_sleep_time_layer = text_layer_create(GRect(0, PBL_IF_ROUND_ELSE(22, -2), PBL_DISPLAY_WIDTH, 30));
|
s_sleep_time_layer = text_layer_create(GRect(0, PBL_IF_ROUND_ELSE(22, 2), PBL_DISPLAY_WIDTH, 30));
|
||||||
text_layer_set_font(s_sleep_time_layer, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD));
|
text_layer_set_font(s_sleep_time_layer, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD));
|
||||||
text_layer_set_font(s_last_watched_layer, fonts_get_system_font(FONT_KEY_GOTHIC_28));
|
text_layer_set_font(s_last_watched_layer, fonts_get_system_font(FONT_KEY_GOTHIC_28));
|
||||||
#else
|
#else
|
||||||
s_sleep_time_layer = text_layer_create(GRect(0, PBL_IF_ROUND_ELSE(25, -2), PBL_DISPLAY_WIDTH, 30));
|
s_sleep_time_layer = text_layer_create(GRect(0, PBL_IF_ROUND_ELSE(25, 2), PBL_DISPLAY_WIDTH, 30));
|
||||||
text_layer_set_font(s_sleep_time_layer, fonts_get_system_font(PBL_IF_ROUND_ELSE(FONT_KEY_GOTHIC_18_BOLD, FONT_KEY_GOTHIC_24_BOLD)));
|
text_layer_set_font(s_sleep_time_layer, fonts_get_system_font(PBL_IF_ROUND_ELSE(FONT_KEY_GOTHIC_18_BOLD, FONT_KEY_GOTHIC_24_BOLD)));
|
||||||
text_layer_set_font(s_last_watched_layer, fonts_get_system_font(FONT_KEY_GOTHIC_24));
|
text_layer_set_font(s_last_watched_layer, fonts_get_system_font(FONT_KEY_GOTHIC_24));
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user