summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/icon.c18
-rw-r--r--apps/gui/scrollbar.c6
-rw-r--r--apps/gui/skin_engine/skin_display.c4
3 files changed, 18 insertions, 10 deletions
diff --git a/apps/gui/icon.c b/apps/gui/icon.c
index 6a5ff708d1..74af4a0d90 100644
--- a/apps/gui/icon.c
+++ b/apps/gui/icon.c
@@ -124,6 +124,7 @@ void screen_put_iconxy(struct screen * display,
124 int screen = display->screen_type; 124 int screen = display->screen_type;
125 int width = ICON_WIDTH(screen); 125 int width = ICON_WIDTH(screen);
126 int height = ICON_HEIGHT(screen); 126 int height = ICON_HEIGHT(screen);
127 int stride;
127 screen_bitmap_part_func *draw_func = NULL; 128 screen_bitmap_part_func *draw_func = NULL;
128 129
129 if (icon == Icon_NOICON) 130 if (icon == Icon_NOICON)
@@ -142,15 +143,20 @@ void screen_put_iconxy(struct screen * display,
142 screen_put_iconxy(display, xpos, ypos, Icon_Questionmark); 143 screen_put_iconxy(display, xpos, ypos, Icon_Questionmark);
143 return; 144 return;
144 } 145 }
145 data = viewer_iconset[screen].data; 146 data = viewer_iconset[screen].data;
147 stride = STRIDE( viewer_iconset[screen].width,
148 viewer_iconset[screen].height);
146 } 149 }
147 else if (custom_icons_loaded[screen]) 150 else if (custom_icons_loaded[screen])
148 { 151 {
149 data = user_iconset[screen].data; 152 data = user_iconset[screen].data;
153 stride = STRIDE( user_iconset[screen].width,
154 user_iconset[screen].height);
150 } 155 }
151 else 156 else
152 { 157 {
153 data = inbuilt_icons[screen]; 158 data = inbuilt_icons[screen];
159 stride = STRIDE(BMPWIDTH_default_icons, BMPHEIGHT_default_icons);
154 } 160 }
155 /* add some left padding to the icons if they are on the edge */ 161 /* add some left padding to the icons if they are on the edge */
156 if (xpos == 0) 162 if (xpos == 0)
@@ -158,12 +164,12 @@ void screen_put_iconxy(struct screen * display,
158 164
159#if (LCD_DEPTH == 16) || defined(LCD_REMOTE_DEPTH) && (LCD_REMOTE_DEPTH == 16) 165#if (LCD_DEPTH == 16) || defined(LCD_REMOTE_DEPTH) && (LCD_REMOTE_DEPTH == 16)
160 if (display->depth == 16) 166 if (display->depth == 16)
161 draw_func = display->transparent_bitmap_part; 167 draw_func = display->transparent_bitmap_part;
162 else 168 else
163#endif 169#endif
164 draw_func = display->bitmap_part; 170 draw_func = display->bitmap_part;
165 171
166 draw_func(data, 0, height * icon, width, xpos, ypos, width, height); 172 draw_func(data, 0, height * icon, stride, xpos, ypos, width, height);
167} 173}
168 174
169void screen_put_cursorxy(struct screen * display, int x, int y, bool on) 175void screen_put_cursorxy(struct screen * display, int x, int y, bool on)
diff --git a/apps/gui/scrollbar.c b/apps/gui/scrollbar.c
index 0f2a485b32..193bb4b65a 100644
--- a/apps/gui/scrollbar.c
+++ b/apps/gui/scrollbar.c
@@ -202,7 +202,8 @@ void gui_bitmap_scrollbar_draw(struct screen * screen, struct bitmap bm, int x,
202#if LCD_DEPTH > 1 202#if LCD_DEPTH > 1
203 else 203 else
204 screen->transparent_bitmap_part((fb_data *)bm.data, 0, 0, 204 screen->transparent_bitmap_part((fb_data *)bm.data, 0, 0,
205 bm.width, x + start, y, size, height); 205 STRIDE(bm.width, bm.height),
206 x + start, y, size, height);
206#endif 207#endif
207 } else { 208 } else {
208#if LCD_DEPTH > 1 209#if LCD_DEPTH > 1
@@ -213,7 +214,8 @@ void gui_bitmap_scrollbar_draw(struct screen * screen, struct bitmap bm, int x,
213#if LCD_DEPTH > 1 214#if LCD_DEPTH > 1
214 else 215 else
215 screen->transparent_bitmap_part((fb_data *)bm.data, 0, 0, 216 screen->transparent_bitmap_part((fb_data *)bm.data, 0, 0,
216 bm.width, x, y + start, width, size); 217 STRIDE(bm.width, bm.height),
218 x, y + start, width, size);
217#endif 219#endif
218 } 220 }
219} 221}
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index a6cab63829..409984494c 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -232,8 +232,8 @@ static void wps_draw_image(struct gui_wps *gwps, struct gui_img *img, int subima
232 } else { 232 } else {
233 display->transparent_bitmap_part((fb_data *)img->bm.data, 233 display->transparent_bitmap_part((fb_data *)img->bm.data,
234 0, img->subimage_height * subimage, 234 0, img->subimage_height * subimage,
235 img->bm.width, img->x, 235 STRIDE(img->bm.width, img->bm.height),
236 img->y, img->bm.width, 236 img->x, img->y, img->bm.width,
237 img->subimage_height); 237 img->subimage_height);
238 } 238 }
239#endif 239#endif