diff options
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/color_picker.c | 30 | ||||
-rw-r--r-- | apps/gui/gwps.c | 6 | ||||
-rw-r--r-- | apps/gui/list.c | 2 | ||||
-rw-r--r-- | apps/gui/pitchscreen.c | 26 | ||||
-rw-r--r-- | apps/gui/quickscreen.c | 2 | ||||
-rw-r--r-- | apps/gui/splash.c | 14 | ||||
-rw-r--r-- | apps/gui/statusbar.c | 8 | ||||
-rw-r--r-- | apps/gui/viewport.c | 6 | ||||
-rw-r--r-- | apps/gui/wps_parser.c | 7 |
9 files changed, 52 insertions, 49 deletions
diff --git a/apps/gui/color_picker.c b/apps/gui/color_picker.c index 239a8b4c81..4ac4fa7fff 100644 --- a/apps/gui/color_picker.c +++ b/apps/gui/color_picker.c | |||
@@ -158,11 +158,11 @@ static void draw_screen(struct screen *display, char *title, | |||
158 | enough to display the selected slider - calculate total height | 158 | enough to display the selected slider - calculate total height |
159 | of display with three sliders present */ | 159 | of display with three sliders present */ |
160 | display_three_rows = | 160 | display_three_rows = |
161 | display->height >= MARGIN_TOP + | 161 | display->getheight() >= MARGIN_TOP + |
162 | display->char_height*4 + /* Title + 3 sliders */ | 162 | display->char_height*4 + /* Title + 3 sliders */ |
163 | TITLE_MARGIN_BOTTOM + | 163 | TITLE_MARGIN_BOTTOM + |
164 | SELECTOR_TB_MARGIN*6 + /* 2 margins/slider */ | 164 | SELECTOR_TB_MARGIN*6 + /* 2 margins/slider */ |
165 | MARGIN_BOTTOM; | 165 | MARGIN_BOTTOM; |
166 | 166 | ||
167 | /* Figure out widest label character in case they vary - | 167 | /* Figure out widest label character in case they vary - |
168 | this function assumes labels are one character */ | 168 | this function assumes labels are one character */ |
@@ -178,13 +178,13 @@ static void draw_screen(struct screen *display, char *title, | |||
178 | /* Draw title string */ | 178 | /* Draw title string */ |
179 | set_drawinfo(display, DRMODE_SOLID, text_color, background_color); | 179 | set_drawinfo(display, DRMODE_SOLID, text_color, background_color); |
180 | display->getstringsize(title, &x, &y); | 180 | display->getstringsize(title, &x, &y); |
181 | display->putsxy((display->width - x) / 2, MARGIN_TOP, title); | 181 | display->putsxy((display->getwidth() - x) / 2, MARGIN_TOP, title); |
182 | 182 | ||
183 | /* Get slider positions and top starting position */ | 183 | /* Get slider positions and top starting position */ |
184 | text_top = MARGIN_TOP + y + TITLE_MARGIN_BOTTOM + SELECTOR_TB_MARGIN; | 184 | text_top = MARGIN_TOP + y + TITLE_MARGIN_BOTTOM + SELECTOR_TB_MARGIN; |
185 | slider_left = MARGIN_LEFT + SELECTOR_WIDTH + SELECTOR_LR_MARGIN + | 185 | slider_left = MARGIN_LEFT + SELECTOR_WIDTH + SELECTOR_LR_MARGIN + |
186 | max_label_width + SLIDER_MARGIN_LEFT; | 186 | max_label_width + SLIDER_MARGIN_LEFT; |
187 | slider_width = display->width - slider_left - SLIDER_MARGIN_RIGHT - | 187 | slider_width = display->getwidth() - slider_left - SLIDER_MARGIN_RIGHT - |
188 | display->char_width*2 - SELECTOR_LR_MARGIN - SELECTOR_WIDTH - | 188 | display->char_width*2 - SELECTOR_LR_MARGIN - SELECTOR_WIDTH - |
189 | MARGIN_RIGHT; | 189 | MARGIN_RIGHT; |
190 | 190 | ||
@@ -208,7 +208,7 @@ static void draw_screen(struct screen *display, char *title, | |||
208 | /* Draw solid bar selection bar */ | 208 | /* Draw solid bar selection bar */ |
209 | display->fillrect(0, | 209 | display->fillrect(0, |
210 | text_top - SELECTOR_TB_MARGIN, | 210 | text_top - SELECTOR_TB_MARGIN, |
211 | display->width, | 211 | display->getwidth(), |
212 | display->char_height + | 212 | display->char_height + |
213 | SELECTOR_TB_MARGIN*2); | 213 | SELECTOR_TB_MARGIN*2); |
214 | 214 | ||
@@ -225,8 +225,8 @@ static void draw_screen(struct screen *display, char *title, | |||
225 | SELECTOR_HEIGHT) / 2; | 225 | SELECTOR_HEIGHT) / 2; |
226 | screen_put_iconxy(display, MARGIN_LEFT, top, Icon_Cursor); | 226 | screen_put_iconxy(display, MARGIN_LEFT, top, Icon_Cursor); |
227 | screen_put_iconxy(display, | 227 | screen_put_iconxy(display, |
228 | display->width - MARGIN_RIGHT - | 228 | display->getwidth() - MARGIN_RIGHT - |
229 | get_icon_width(display->screen_type), | 229 | get_icon_width(display->screen_type), |
230 | top, Icon_Cursor); | 230 | top, Icon_Cursor); |
231 | } | 231 | } |
232 | 232 | ||
@@ -282,9 +282,9 @@ static void draw_screen(struct screen *display, char *title, | |||
282 | /* Display color swatch on color screens only */ | 282 | /* Display color swatch on color screens only */ |
283 | int left = MARGIN_LEFT + SELECTOR_WIDTH + SELECTOR_LR_MARGIN; | 283 | int left = MARGIN_LEFT + SELECTOR_WIDTH + SELECTOR_LR_MARGIN; |
284 | int top = text_top + SWATCH_TOP_MARGIN; | 284 | int top = text_top + SWATCH_TOP_MARGIN; |
285 | int width = display->width - left - SELECTOR_LR_MARGIN - | 285 | int width = display->getwidth() - left - SELECTOR_LR_MARGIN - |
286 | SELECTOR_WIDTH - MARGIN_RIGHT; | 286 | SELECTOR_WIDTH - MARGIN_RIGHT; |
287 | int height = display->height - top - MARGIN_BOTTOM; | 287 | int height = display->getheight() - top - MARGIN_BOTTOM; |
288 | 288 | ||
289 | /* Only draw if room */ | 289 | /* Only draw if room */ |
290 | if (height >= display->char_height + 2) | 290 | if (height >= display->char_height + 2) |
@@ -314,11 +314,11 @@ static void draw_screen(struct screen *display, char *title, | |||
314 | display->getstringsize(buf, &x, &y); | 314 | display->getstringsize(buf, &x, &y); |
315 | i = text_top + SWATCH_TOP_MARGIN; | 315 | i = text_top + SWATCH_TOP_MARGIN; |
316 | 316 | ||
317 | if (i + y <= display->height - MARGIN_BOTTOM) | 317 | if (i + y <= display->getheight() - MARGIN_BOTTOM) |
318 | { | 318 | { |
319 | set_drawinfo(display, DRMODE_SOLID, text_color, background_color); | 319 | set_drawinfo(display, DRMODE_SOLID, text_color, background_color); |
320 | x = (display->width - x) / 2; | 320 | x = (display->getwidth() - x) / 2; |
321 | y = (i + display->height - MARGIN_BOTTOM - y) / 2; | 321 | y = (i + display->getheight() - MARGIN_BOTTOM - y) / 2; |
322 | display->putsxy(x, y, buf); | 322 | display->putsxy(x, y, buf); |
323 | } | 323 | } |
324 | } | 324 | } |
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c index d752cb3da5..a7c5295f48 100644 --- a/apps/gui/gwps.c +++ b/apps/gui/gwps.c | |||
@@ -788,17 +788,17 @@ static void statusbar_toggle_handler(void *data) | |||
788 | if (!global_settings.statusbar && !draw) | 788 | if (!global_settings.statusbar && !draw) |
789 | { | 789 | { |
790 | vp->vp.y = 0; | 790 | vp->vp.y = 0; |
791 | vp->vp.height = screens[i].height; | 791 | vp->vp.height = screens[i].lcdheight; |
792 | } | 792 | } |
793 | else | 793 | else |
794 | { | 794 | { |
795 | vp->vp.y = STATUSBAR_HEIGHT; | 795 | vp->vp.y = STATUSBAR_HEIGHT; |
796 | vp->vp.height = screens[i].height - STATUSBAR_HEIGHT; | 796 | vp->vp.height = screens[i].lcdheight - STATUSBAR_HEIGHT; |
797 | } | 797 | } |
798 | } | 798 | } |
799 | } | 799 | } |
800 | #endif | 800 | #endif |
801 | 801 | ||
802 | void gui_sync_wps_init(void) | 802 | void gui_sync_wps_init(void) |
803 | { | 803 | { |
804 | int i; | 804 | int i; |
diff --git a/apps/gui/list.c b/apps/gui/list.c index 0ec40d3aed..96652ce0a9 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c | |||
@@ -78,7 +78,7 @@ void list_init_viewports(struct gui_synclist *list) | |||
78 | { | 78 | { |
79 | viewport_set_defaults(vp, i); | 79 | viewport_set_defaults(vp, i); |
80 | list->parent[i]->y = gui_statusbar_height(); | 80 | list->parent[i]->y = gui_statusbar_height(); |
81 | list->parent[i]->height = screens[i].height - list->parent[i]->y; | 81 | list->parent[i]->height = screens[i].lcdheight - list->parent[i]->y; |
82 | } | 82 | } |
83 | } | 83 | } |
84 | #ifdef HAVE_BUTTONBAR | 84 | #ifdef HAVE_BUTTONBAR |
diff --git a/apps/gui/pitchscreen.c b/apps/gui/pitchscreen.c index c9d6750242..e0a7416ac6 100644 --- a/apps/gui/pitchscreen.c +++ b/apps/gui/pitchscreen.c | |||
@@ -64,7 +64,7 @@ static void pitch_screen_draw(struct screen *display, int pitch, int pitch_mode) | |||
64 | { | 64 | { |
65 | w = snprintf((char *)buf, sizeof(buf), "%s: %d.%d%%",str(LANG_PITCH), | 65 | w = snprintf((char *)buf, sizeof(buf), "%s: %d.%d%%",str(LANG_PITCH), |
66 | pitch / 10, pitch % 10 ); | 66 | pitch / 10, pitch % 10 ); |
67 | display->putsxy((display->width-(w*display->char_width))/2, | 67 | display->putsxy((display->lcdwidth-(w*display->char_width))/2, |
68 | display->nb_lines/2,buf); | 68 | display->nb_lines/2,buf); |
69 | } | 69 | } |
70 | else /* bigger screen, show everything... */ | 70 | else /* bigger screen, show everything... */ |
@@ -77,9 +77,9 @@ static void pitch_screen_draw(struct screen *display, int pitch, int pitch_mode) | |||
77 | ptr = str(LANG_PITCH_UP_SEMITONE); | 77 | ptr = str(LANG_PITCH_UP_SEMITONE); |
78 | } | 78 | } |
79 | display->getstringsize(ptr,&w,&h); | 79 | display->getstringsize(ptr,&w,&h); |
80 | display->putsxy((display->width-w)/2, 0, ptr); | 80 | display->putsxy((display->lcdwidth-w)/2, 0, ptr); |
81 | display->mono_bitmap(bitmap_icons_7x8[Icon_UpArrow], | 81 | display->mono_bitmap(bitmap_icons_7x8[Icon_UpArrow], |
82 | display->width/2 - 3, h, 7, 8); | 82 | display->lcdwidth/2 - 3, h, 7, 8); |
83 | 83 | ||
84 | /* DOWN: Pitch Down */ | 84 | /* DOWN: Pitch Down */ |
85 | if (pitch_mode == PITCH_MODE_ABSOLUTE) { | 85 | if (pitch_mode == PITCH_MODE_ABSOLUTE) { |
@@ -88,33 +88,35 @@ static void pitch_screen_draw(struct screen *display, int pitch, int pitch_mode) | |||
88 | ptr = str(LANG_PITCH_DOWN_SEMITONE); | 88 | ptr = str(LANG_PITCH_DOWN_SEMITONE); |
89 | } | 89 | } |
90 | display->getstringsize(ptr,&w,&h); | 90 | display->getstringsize(ptr,&w,&h); |
91 | display->putsxy((display->width-w)/2, display->height - h, ptr); | 91 | display->putsxy((display->lcdwidth-w)/2, display->lcdheight - h, ptr); |
92 | display->mono_bitmap(bitmap_icons_7x8[Icon_DownArrow], | 92 | display->mono_bitmap(bitmap_icons_7x8[Icon_DownArrow], |
93 | display->width/2 - 3, display->height - h*2, 7, 8); | 93 | display->lcdwidth/2 - 3, |
94 | display->lcdheight - h*2, 7, 8); | ||
94 | 95 | ||
95 | /* RIGHT: +2% */ | 96 | /* RIGHT: +2% */ |
96 | ptr = "+2%"; | 97 | ptr = "+2%"; |
97 | display->getstringsize(ptr,&w,&h); | 98 | display->getstringsize(ptr,&w,&h); |
98 | display->putsxy(display->width-w, (display->height-h)/2, ptr); | 99 | display->putsxy(display->lcdwidth-w, (display->lcdheight-h)/2, ptr); |
99 | display->mono_bitmap(bitmap_icons_7x8[Icon_FastForward], | 100 | display->mono_bitmap(bitmap_icons_7x8[Icon_FastForward], |
100 | display->width-w-8, (display->height-h)/2, 7, 8); | 101 | display->lcdwidth-w-8, |
102 | (display->lcdheight-h)/2, 7, 8); | ||
101 | 103 | ||
102 | /* LEFT: -2% */ | 104 | /* LEFT: -2% */ |
103 | ptr = "-2%"; | 105 | ptr = "-2%"; |
104 | display->getstringsize(ptr,&w,&h); | 106 | display->getstringsize(ptr,&w,&h); |
105 | display->putsxy(0, (display->height-h)/2, ptr); | 107 | display->putsxy(0, (display->lcdheight-h)/2, ptr); |
106 | display->mono_bitmap(bitmap_icons_7x8[Icon_FastBackward], | 108 | display->mono_bitmap(bitmap_icons_7x8[Icon_FastBackward], |
107 | w+1, (display->height-h)/2, 7, 8); | 109 | w+1, (display->lcdheight-h)/2, 7, 8); |
108 | 110 | ||
109 | /* "Pitch" */ | 111 | /* "Pitch" */ |
110 | snprintf((char *)buf, sizeof(buf), str(LANG_PITCH)); | 112 | snprintf((char *)buf, sizeof(buf), str(LANG_PITCH)); |
111 | display->getstringsize(buf,&w,&h); | 113 | display->getstringsize(buf,&w,&h); |
112 | display->putsxy((display->width-w)/2, (display->height/2)-h, buf); | 114 | display->putsxy((display->lcdwidth-w)/2, (display->lcdheight/2)-h, buf); |
113 | /* "XX.X%" */ | 115 | /* "XX.X%" */ |
114 | snprintf((char *)buf, sizeof(buf), "%d.%d%%", | 116 | snprintf((char *)buf, sizeof(buf), "%d.%d%%", |
115 | pitch / 10, pitch % 10 ); | 117 | pitch / 10, pitch % 10 ); |
116 | display->getstringsize(buf,&w,&h); | 118 | display->getstringsize(buf,&w,&h); |
117 | display->putsxy((display->width-w)/2, display->height/2, buf); | 119 | display->putsxy((display->lcdwidth-w)/2, display->lcdheight/2, buf); |
118 | } | 120 | } |
119 | 121 | ||
120 | display->update(); | 122 | display->update(); |
@@ -123,7 +125,7 @@ static void pitch_screen_draw(struct screen *display, int pitch, int pitch_mode) | |||
123 | static int pitch_increase(int pitch, int delta, bool allow_cutoff) | 125 | static int pitch_increase(int pitch, int delta, bool allow_cutoff) |
124 | { | 126 | { |
125 | int new_pitch; | 127 | int new_pitch; |
126 | 128 | ||
127 | if (delta < 0) { | 129 | if (delta < 0) { |
128 | if (pitch + delta >= PITCH_MIN) { | 130 | if (pitch + delta >= PITCH_MIN) { |
129 | new_pitch = pitch + delta; | 131 | new_pitch = pitch + delta; |
diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c index 3eb9426c39..ef1111fe3e 100644 --- a/apps/gui/quickscreen.c +++ b/apps/gui/quickscreen.c | |||
@@ -107,7 +107,7 @@ static void quickscreen_fix_viewports(struct gui_quickscreen *qs, | |||
107 | vp_icons[screen].height = | 107 | vp_icons[screen].height = |
108 | vps[screen][QUICKSCREEN_BOTTOM].y - vp_icons[screen].y; | 108 | vps[screen][QUICKSCREEN_BOTTOM].y - vp_icons[screen].y; |
109 | 109 | ||
110 | if (left_width + right_width > display->width - CENTER_ICONAREA_WIDTH) | 110 | if (left_width + right_width > display->lcdwidth - CENTER_ICONAREA_WIDTH) |
111 | { | 111 | { |
112 | /* scrolling needed */ | 112 | /* scrolling needed */ |
113 | int width = (parent->width - CENTER_ICONAREA_WIDTH)/2; | 113 | int width = (parent->width - CENTER_ICONAREA_WIDTH)/2; |
diff --git a/apps/gui/splash.c b/apps/gui/splash.c index 0405c0586d..b4b451eed6 100644 --- a/apps/gui/splash.c +++ b/apps/gui/splash.c | |||
@@ -91,14 +91,14 @@ static void splash(struct screen * screen, const char *fmt, va_list ap) | |||
91 | #endif | 91 | #endif |
92 | if (lastbreak) | 92 | if (lastbreak) |
93 | { | 93 | { |
94 | if (x + (next - lastbreak) * space_w + w > screen->width) | 94 | if (x + (next - lastbreak) * space_w + w > screen->lcdwidth) |
95 | { /* too wide, wrap */ | 95 | { /* too wide, wrap */ |
96 | widths[line] = x; | 96 | widths[line] = x; |
97 | #ifdef HAVE_LCD_BITMAP | 97 | #ifdef HAVE_LCD_BITMAP |
98 | if (x > maxw) | 98 | if (x > maxw) |
99 | maxw = x; | 99 | maxw = x; |
100 | #endif | 100 | #endif |
101 | if ((y + h > screen->height) || (line >= (MAXLINES-1))) | 101 | if ((y + h > screen->lcdheight) || (line >= (MAXLINES-1))) |
102 | break; /* screen full or out of lines */ | 102 | break; /* screen full or out of lines */ |
103 | x = 0; | 103 | x = 0; |
104 | y += h; | 104 | y += h; |
@@ -132,8 +132,8 @@ static void splash(struct screen * screen, const char *fmt, va_list ap) | |||
132 | #ifdef HAVE_LCD_BITMAP | 132 | #ifdef HAVE_LCD_BITMAP |
133 | /* If we center the display, then just clear the box we need and put | 133 | /* If we center the display, then just clear the box we need and put |
134 | a nice little frame and put the text in there! */ | 134 | a nice little frame and put the text in there! */ |
135 | y = (screen->height - y) / 2; /* height => y start position */ | 135 | y = (screen->lcdheight - y) / 2; /* height => y start position */ |
136 | x = (screen->width - maxw) / 2 - 2; | 136 | x = (screen->lcdwidth - maxw) / 2 - 2; |
137 | 137 | ||
138 | #if LCD_DEPTH > 1 | 138 | #if LCD_DEPTH > 1 |
139 | if (screen->depth > 1) | 139 | if (screen->depth > 1) |
@@ -147,7 +147,7 @@ static void splash(struct screen * screen, const char *fmt, va_list ap) | |||
147 | #endif | 147 | #endif |
148 | screen->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 148 | screen->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
149 | 149 | ||
150 | screen->fillrect(x, y-2, maxw+4, screen->height-y*2+4); | 150 | screen->fillrect(x, y-2, maxw+4, screen->lcdheight-y*2+4); |
151 | 151 | ||
152 | #if LCD_DEPTH > 1 | 152 | #if LCD_DEPTH > 1 |
153 | if (screen->depth > 1) | 153 | if (screen->depth > 1) |
@@ -156,7 +156,7 @@ static void splash(struct screen * screen, const char *fmt, va_list ap) | |||
156 | #endif | 156 | #endif |
157 | screen->set_drawmode(DRMODE_SOLID); | 157 | screen->set_drawmode(DRMODE_SOLID); |
158 | 158 | ||
159 | screen->drawrect(x, y-2, maxw+4, screen->height-y*2+4); | 159 | screen->drawrect(x, y-2, maxw+4, screen->lcdheight-y*2+4); |
160 | #else /* HAVE_LCD_CHARCELLS */ | 160 | #else /* HAVE_LCD_CHARCELLS */ |
161 | y = 0; /* vertical centering on 2 lines would be silly */ | 161 | y = 0; /* vertical centering on 2 lines would be silly */ |
162 | x = 0; | 162 | x = 0; |
@@ -167,7 +167,7 @@ static void splash(struct screen * screen, const char *fmt, va_list ap) | |||
167 | 167 | ||
168 | for (i = 0; i <= line; i++) | 168 | for (i = 0; i <= line; i++) |
169 | { | 169 | { |
170 | x = MAX((screen->width - widths[i]) / 2, 0); | 170 | x = MAX((screen->lcdwidth - widths[i]) / 2, 0); |
171 | 171 | ||
172 | #ifdef HAVE_LCD_BITMAP | 172 | #ifdef HAVE_LCD_BITMAP |
173 | screen->putsxy(x, y, lines[i]); | 173 | screen->putsxy(x, y, lines[i]); |
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c index b9941eb061..0a421e8b16 100644 --- a/apps/gui/statusbar.c +++ b/apps/gui/statusbar.c | |||
@@ -256,7 +256,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
256 | memcmp(&(bar->info), &(bar->lastinfo), sizeof(struct status_info))) | 256 | memcmp(&(bar->info), &(bar->lastinfo), sizeof(struct status_info))) |
257 | { | 257 | { |
258 | display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 258 | display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
259 | display->fillrect(0, 0, display->width, STATUSBAR_HEIGHT); | 259 | display->fillrect(0, 0, display->getwidth(), STATUSBAR_HEIGHT); |
260 | display->set_drawmode(DRMODE_SOLID); | 260 | display->set_drawmode(DRMODE_SOLID); |
261 | 261 | ||
262 | if (bar->info.battery_state) | 262 | if (bar->info.battery_state) |
@@ -329,7 +329,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
329 | if(!display->has_disk_led && bar->info.led) | 329 | if(!display->has_disk_led && bar->info.led) |
330 | gui_statusbar_led(display); | 330 | gui_statusbar_led(display); |
331 | #endif | 331 | #endif |
332 | display->update_rect(0, 0, display->width, STATUSBAR_HEIGHT); | 332 | display->update_rect(0, 0, display->getwidth(), STATUSBAR_HEIGHT); |
333 | bar->lastinfo = bar->info; | 333 | bar->lastinfo = bar->info; |
334 | } | 334 | } |
335 | #endif /* HAVE_LCD_BITMAP */ | 335 | #endif /* HAVE_LCD_BITMAP */ |
@@ -573,7 +573,7 @@ static void gui_statusbar_icon_lock_remote(struct screen * display) | |||
573 | static void gui_statusbar_led(struct screen * display) | 573 | static void gui_statusbar_led(struct screen * display) |
574 | { | 574 | { |
575 | display->mono_bitmap(bitmap_icon_disk, | 575 | display->mono_bitmap(bitmap_icon_disk, |
576 | STATUSBAR_DISK_X_POS(display->width), | 576 | STATUSBAR_DISK_X_POS(display->getwidth()), |
577 | STATUSBAR_Y_POS, STATUSBAR_DISK_WIDTH, | 577 | STATUSBAR_Y_POS, STATUSBAR_DISK_WIDTH, |
578 | STATUSBAR_HEIGHT); | 578 | STATUSBAR_HEIGHT); |
579 | } | 579 | } |
@@ -605,7 +605,7 @@ static void gui_statusbar_time(struct screen * display, struct tm *time) | |||
605 | display->setfont(FONT_SYSFIXED); | 605 | display->setfont(FONT_SYSFIXED); |
606 | display->getstringsize(buffer, &width, &height); | 606 | display->getstringsize(buffer, &width, &height); |
607 | if (height <= STATUSBAR_HEIGHT) { | 607 | if (height <= STATUSBAR_HEIGHT) { |
608 | display->putsxy(STATUSBAR_TIME_X_END(display->width) - width, | 608 | display->putsxy(STATUSBAR_TIME_X_END(display->getwidth()) - width, |
609 | STATUSBAR_Y_POS, buffer); | 609 | STATUSBAR_Y_POS, buffer); |
610 | } | 610 | } |
611 | display->setfont(FONT_UI); | 611 | display->setfont(FONT_UI); |
diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c index 6aad7c5b05..ef61494b71 100644 --- a/apps/gui/viewport.c +++ b/apps/gui/viewport.c | |||
@@ -48,10 +48,10 @@ int viewport_get_nb_lines(struct viewport *vp) | |||
48 | void viewport_set_defaults(struct viewport *vp, enum screen_type screen) | 48 | void viewport_set_defaults(struct viewport *vp, enum screen_type screen) |
49 | { | 49 | { |
50 | vp->x = 0; | 50 | vp->x = 0; |
51 | vp->width = screens[screen].width; | 51 | vp->width = screens[screen].lcdwidth; |
52 | 52 | ||
53 | vp->y = gui_statusbar_height(); | 53 | vp->y = gui_statusbar_height(); |
54 | vp->height = screens[screen].height - vp->y; | 54 | vp->height = screens[screen].lcdheight - vp->y; |
55 | #ifdef HAVE_LCD_BITMAP | 55 | #ifdef HAVE_LCD_BITMAP |
56 | vp->drawmode = DRMODE_SOLID; | 56 | vp->drawmode = DRMODE_SOLID; |
57 | vp->font = FONT_UI; /* default to UI to discourage SYSFONT use */ | 57 | vp->font = FONT_UI; /* default to UI to discourage SYSFONT use */ |
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c index e89f2692cf..73516f604d 100644 --- a/apps/gui/wps_parser.c +++ b/apps/gui/wps_parser.c | |||
@@ -1550,16 +1550,17 @@ bool wps_data_load(struct wps_data *wps_data, | |||
1550 | 1550 | ||
1551 | /* Initialise the first (default) viewport */ | 1551 | /* Initialise the first (default) viewport */ |
1552 | wps_data->viewports[0].vp.x = 0; | 1552 | wps_data->viewports[0].vp.x = 0; |
1553 | wps_data->viewports[0].vp.width = display->width; | 1553 | wps_data->viewports[0].vp.width = display->getwidth(); |
1554 | if (!global_settings.statusbar) | 1554 | if (!global_settings.statusbar) |
1555 | { | 1555 | { |
1556 | wps_data->viewports[0].vp.y = 0; | 1556 | wps_data->viewports[0].vp.y = 0; |
1557 | wps_data->viewports[0].vp.height = display->height; | 1557 | wps_data->viewports[0].vp.height = display->getheight(); |
1558 | } | 1558 | } |
1559 | else | 1559 | else |
1560 | { | 1560 | { |
1561 | wps_data->viewports[0].vp.y = STATUSBAR_HEIGHT; | 1561 | wps_data->viewports[0].vp.y = STATUSBAR_HEIGHT; |
1562 | wps_data->viewports[0].vp.height = display->height - STATUSBAR_HEIGHT; | 1562 | wps_data->viewports[0].vp.height = display->getheight() - |
1563 | STATUSBAR_HEIGHT; | ||
1563 | } | 1564 | } |
1564 | #ifdef HAVE_LCD_BITMAP | 1565 | #ifdef HAVE_LCD_BITMAP |
1565 | wps_data->viewports[0].vp.font = FONT_UI; | 1566 | wps_data->viewports[0].vp.font = FONT_UI; |