summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/skin_display.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/skin_engine/skin_display.c')
-rw-r--r--apps/gui/skin_engine/skin_display.c58
1 files changed, 7 insertions, 51 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index 95e4310de9..d2dbb56f64 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -248,22 +248,8 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb)
248 if (pb->backdrop) 248 if (pb->backdrop)
249 { 249 {
250 struct gui_img *img = pb->backdrop; 250 struct gui_img *img = pb->backdrop;
251 char *img_data = core_get_data(img->buflib_handle); 251 img->bm.data = core_get_data(img->buflib_handle);
252#if LCD_DEPTH > 1 252 display->bmp_part(&img->bm, 0, 0, x, y, width, height);
253 if(img->bm.format == FORMAT_MONO) {
254#endif
255 display->mono_bitmap_part(img_data,
256 0, 0, img->bm.width,
257 x, y, width, height);
258#if LCD_DEPTH > 1
259 } else {
260 display->transparent_bitmap_part((fb_data *)img_data,
261 0, 0,
262 STRIDE(display->screen_type,
263 img->bm.width, img->bm.height),
264 x, y, width, height);
265 }
266#endif
267 flags |= DONT_CLEAR_EXCESS; 253 flags |= DONT_CLEAR_EXCESS;
268 } 254 }
269 255
@@ -287,7 +273,7 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb)
287 int xoff = 0, yoff = 0; 273 int xoff = 0, yoff = 0;
288 int w = width, h = height; 274 int w = width, h = height;
289 struct gui_img *img = pb->slider; 275 struct gui_img *img = pb->slider;
290 char *img_data = core_get_data(img->buflib_handle); 276 img->bm.data = core_get_data(img->buflib_handle);
291 277
292 if (flags&HORIZONTAL) 278 if (flags&HORIZONTAL)
293 { 279 {
@@ -305,21 +291,7 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb)
305 yoff = height - yoff; 291 yoff = height - yoff;
306 yoff -= h / 2; 292 yoff -= h / 2;
307 } 293 }
308#if LCD_DEPTH > 1 294 display->bmp_part(&img->bm, 0, 0, x + xoff, y + yoff, w, h);
309 if(img->bm.format == FORMAT_MONO) {
310#endif
311 display->mono_bitmap_part(img_data,
312 0, 0, img->bm.width,
313 x + xoff, y + yoff, w, h);
314#if LCD_DEPTH > 1
315 } else {
316 display->transparent_bitmap_part((fb_data *)img_data,
317 0, 0,
318 STRIDE(display->screen_type,
319 img->bm.width, img->bm.height),
320 x + xoff, y + yoff, w, h);
321 }
322#endif
323 } 295 }
324 296
325 if (pb->type == SKIN_TOKEN_PROGRESSBAR) 297 if (pb->type == SKIN_TOKEN_PROGRESSBAR)
@@ -357,30 +329,14 @@ void clear_image_pos(struct gui_wps *gwps, struct gui_img *img)
357void wps_draw_image(struct gui_wps *gwps, struct gui_img *img, int subimage) 329void wps_draw_image(struct gui_wps *gwps, struct gui_img *img, int subimage)
358{ 330{
359 struct screen *display = gwps->display; 331 struct screen *display = gwps->display;
360 char *img_data = core_get_data(img->buflib_handle); 332 img->bm.data = core_get_data(img->buflib_handle);
361 if(img->always_display) 333 if(img->always_display)
362 display->set_drawmode(DRMODE_FG); 334 display->set_drawmode(DRMODE_FG);
363 else 335 else
364 display->set_drawmode(DRMODE_SOLID); 336 display->set_drawmode(DRMODE_SOLID);
365 337
366#if LCD_DEPTH > 1 338 display->bmp_part(&img->bm, 0, img->subimage_height * subimage,
367 if(img->bm.format == FORMAT_MONO) { 339 img->x, img->y, img->bm.width, img->subimage_height);
368#endif
369 display->mono_bitmap_part(img_data,
370 0, img->subimage_height * subimage,
371 img->bm.width, img->x,
372 img->y, img->bm.width,
373 img->subimage_height);
374#if LCD_DEPTH > 1
375 } else {
376 display->transparent_bitmap_part((fb_data *)img_data,
377 0, img->subimage_height * subimage,
378 STRIDE(display->screen_type,
379 img->bm.width, img->bm.height),
380 img->x, img->y, img->bm.width,
381 img->subimage_height);
382 }
383#endif
384} 340}
385 341
386 342