Add newlines where applicable
This commit is contained in:
14
src/c/main.c
14
src/c/main.c
@@ -116,8 +116,16 @@ static void update_result_text(void) {
|
||||
mask_to_dotted(mask, mask_text, sizeof(mask_text));
|
||||
|
||||
snprintf(s_cidr_text, sizeof(s_cidr_text), "CIDR: /%d", s_current_prefix);
|
||||
snprintf(s_mask_text, sizeof(s_mask_text), "Mask: %s", mask_text);
|
||||
#if PBL_RECT
|
||||
snprintf(s_mask_text, sizeof(s_mask_text), "\nMask:\n%s", mask_text);
|
||||
snprintf(s_usable_hosts_text, sizeof(s_usable_hosts_text), "\nUsable Hosts:\n%llu", usable_hosts);
|
||||
#else
|
||||
#if PBL_PLATFORM_CHALK
|
||||
snprintf(s_usable_hosts_text, sizeof(s_usable_hosts_text), "Usable Hosts:\n%llu", usable_hosts);
|
||||
#else
|
||||
snprintf(s_usable_hosts_text, sizeof(s_usable_hosts_text), "Usable Hosts: %llu", usable_hosts);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int pos = 0;
|
||||
for (int i = 0; i < 32; i++) {
|
||||
@@ -349,14 +357,14 @@ static void result_window_load(Window *window) {
|
||||
text_layer_set_overflow_mode(s_cidr_text_layer, GTextOverflowModeTrailingEllipsis);
|
||||
text_layer_set_text(s_cidr_text_layer, s_cidr_text);
|
||||
|
||||
s_mask_text_layer = text_layer_create(GRect(0, 0, PBL_DISPLAY_WIDTH, 24));
|
||||
s_mask_text_layer = text_layer_create(GRect(0, 0, PBL_DISPLAY_WIDTH, 56));
|
||||
text_layer_set_background_color(s_mask_text_layer, GColorClear);
|
||||
text_layer_set_text_color(s_mask_text_layer, GColorWhite);
|
||||
text_layer_set_font(s_mask_text_layer, fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD));
|
||||
text_layer_set_overflow_mode(s_mask_text_layer, GTextOverflowModeTrailingEllipsis);
|
||||
text_layer_set_text(s_mask_text_layer, s_mask_text);
|
||||
|
||||
s_usable_hosts_text_layer = text_layer_create(GRect(0, 0, PBL_DISPLAY_WIDTH, 24));
|
||||
s_usable_hosts_text_layer = text_layer_create(GRect(0, 0, PBL_DISPLAY_WIDTH, 56));
|
||||
text_layer_set_background_color(s_usable_hosts_text_layer, GColorClear);
|
||||
text_layer_set_text_color(s_usable_hosts_text_layer, GColorWhite);
|
||||
text_layer_set_font(s_usable_hosts_text_layer, fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD));
|
||||
|
||||
Reference in New Issue
Block a user