summaryrefslogtreecommitdiff
path: root/apps/settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings.c')
-rw-r--r--apps/settings.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 74843fe20d..afd9840b2a 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -733,22 +733,22 @@ void set_time(char* string, int timedate[])
733 lcd_getstringsize(reffub, 0, &width, &height); 733 lcd_getstringsize(reffub, 0, &width, &height);
734 cursor[0][INDEX_X] = 0; 734 cursor[0][INDEX_X] = 0;
735 cursor[0][INDEX_Y] = 1 + prev_line_height + 1; 735 cursor[0][INDEX_Y] = 1 + prev_line_height + 1;
736 cursor[0][INDEX_WIDTH] = width + strlen(reffub) - 1; 736 cursor[0][INDEX_WIDTH] = width;
737 737
738 strncpy(reffub, buffer + 3, 2); 738 strncpy(reffub, buffer + 3, 2);
739 reffub[2] = '\0'; 739 reffub[2] = '\0';
740 lcd_getstringsize(reffub, 0, &width, &height); 740 lcd_getstringsize(reffub, 0, &width, &height);
741 cursor[1][INDEX_X] = cursor[0][INDEX_WIDTH] + 1 + separator_width + 1; 741 cursor[1][INDEX_X] = cursor[0][INDEX_WIDTH] + separator_width;
742 cursor[1][INDEX_Y] = 1 + prev_line_height + 1; 742 cursor[1][INDEX_Y] = 1 + prev_line_height + 1;
743 cursor[1][INDEX_WIDTH] = width + strlen(reffub) - 1; 743 cursor[1][INDEX_WIDTH] = width;
744 744
745 strncpy(reffub, buffer + 6, 2); 745 strncpy(reffub, buffer + 6, 2);
746 reffub[2] = '\0'; 746 reffub[2] = '\0';
747 lcd_getstringsize(reffub, 0, &width, &height); 747 lcd_getstringsize(reffub, 0, &width, &height);
748 cursor[2][INDEX_X] = cursor[0][INDEX_WIDTH] + 1 + separator_width + 1 + 748 cursor[2][INDEX_X] = cursor[0][INDEX_WIDTH] + separator_width +
749 cursor[1][INDEX_WIDTH] + 1 + separator_width + 1; 749 cursor[1][INDEX_WIDTH] + separator_width;
750 cursor[2][INDEX_Y] = 1 + prev_line_height + 1; 750 cursor[2][INDEX_Y] = 1 + prev_line_height + 1;
751 cursor[2][INDEX_WIDTH] = width + strlen(reffub) - 1; 751 cursor[2][INDEX_WIDTH] = width;
752 752
753 lcd_getstringsize(buffer, 0, &width, &prev_line_height); 753 lcd_getstringsize(buffer, 0, &width, &prev_line_height);
754#elif defined(LOADABLE_FONTS) 754#elif defined(LOADABLE_FONTS)
@@ -794,32 +794,31 @@ void set_time(char* string, int timedate[])
794 strncpy(reffub, buffer, 3); 794 strncpy(reffub, buffer, 3);
795 reffub[3] = '\0'; 795 reffub[3] = '\0';
796 lcd_getstringsize(reffub, 0, &weekday_width, &height); 796 lcd_getstringsize(reffub, 0, &weekday_width, &height);
797 weekday_width += strlen(reffub) - 1;
798 lcd_getstringsize(" ", 0, &separator_width, &height); 797 lcd_getstringsize(" ", 0, &separator_width, &height);
799 798
800 strncpy(reffub, buffer + 4, 4); 799 strncpy(reffub, buffer + 4, 4);
801 reffub[4] = '\0'; 800 reffub[4] = '\0';
802 lcd_getstringsize(reffub, 0, &width, &height); 801 lcd_getstringsize(reffub, 0, &width, &height);
803 cursor[3][INDEX_X] = weekday_width + 1 + separator_width + 1; 802 cursor[3][INDEX_X] = weekday_width + separator_width;
804 cursor[3][INDEX_Y] = cursor[0][INDEX_Y] + prev_line_height + 1; 803 cursor[3][INDEX_Y] = cursor[0][INDEX_Y] + prev_line_height + 1;
805 cursor[3][INDEX_WIDTH] = width + strlen(reffub) - 1; 804 cursor[3][INDEX_WIDTH] = width;
806 805
807 strncpy(reffub, buffer + 9, 3); 806 strncpy(reffub, buffer + 9, 3);
808 reffub[3] = '\0'; 807 reffub[3] = '\0';
809 lcd_getstringsize(reffub, 0, &width, &height); 808 lcd_getstringsize(reffub, 0, &width, &height);
810 cursor[4][INDEX_X] = weekday_width + 1 + separator_width + 1 + 809 cursor[4][INDEX_X] = weekday_width + separator_width +
811 cursor[3][INDEX_WIDTH] + 1 + separator_width + 1; 810 cursor[3][INDEX_WIDTH] + separator_width;
812 cursor[4][INDEX_Y] = cursor[0][INDEX_Y] + prev_line_height + 1; 811 cursor[4][INDEX_Y] = cursor[0][INDEX_Y] + prev_line_height + 1;
813 cursor[4][INDEX_WIDTH] = width + strlen(reffub) - 1; 812 cursor[4][INDEX_WIDTH] = width;
814 813
815 strncpy(reffub, buffer + 13, 2); 814 strncpy(reffub, buffer + 13, 2);
816 reffub[2] = '\0'; 815 reffub[2] = '\0';
817 lcd_getstringsize(reffub, 0, &width, &height); 816 lcd_getstringsize(reffub, 0, &width, &height);
818 cursor[5][INDEX_X] = weekday_width + 1 + separator_width + 1 + 817 cursor[5][INDEX_X] = weekday_width + separator_width +
819 cursor[3][INDEX_WIDTH] + 1 + separator_width + 1 + 818 cursor[3][INDEX_WIDTH] + separator_width +
820 cursor[4][INDEX_WIDTH] + 1 + separator_width + 1; 819 cursor[4][INDEX_WIDTH] + separator_width;
821 cursor[5][INDEX_Y] = cursor[0][INDEX_Y] + prev_line_height + 1; 820 cursor[5][INDEX_Y] = cursor[0][INDEX_Y] + prev_line_height + 1;
822 cursor[5][INDEX_WIDTH] = width + strlen(reffub) - 1; 821 cursor[5][INDEX_WIDTH] = width;
823 822
824 lcd_invertrect(cursor[cursorpos][INDEX_X], 823 lcd_invertrect(cursor[cursorpos][INDEX_X],
825 cursor[cursorpos][INDEX_Y] + lcd_getymargin(), 824 cursor[cursorpos][INDEX_Y] + lcd_getymargin(),