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.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index 49f9f86133..f7a0888afc 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -22,6 +22,7 @@
22#include "config.h" 22#include "config.h"
23#include <stdio.h> 23#include <stdio.h>
24#include "string-extra.h" 24#include "string-extra.h"
25#include "core_alloc.h"
25#include "misc.h" 26#include "misc.h"
26#include "font.h" 27#include "font.h"
27#include "system.h" 28#include "system.h"
@@ -247,15 +248,16 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb)
247 if (pb->backdrop) 248 if (pb->backdrop)
248 { 249 {
249 struct gui_img *img = pb->backdrop; 250 struct gui_img *img = pb->backdrop;
251 char *img_data = core_get_data(img->buflib_handle);
250#if LCD_DEPTH > 1 252#if LCD_DEPTH > 1
251 if(img->bm.format == FORMAT_MONO) { 253 if(img->bm.format == FORMAT_MONO) {
252#endif 254#endif
253 display->mono_bitmap_part(img->bm.data, 255 display->mono_bitmap_part(img_data,
254 0, 0, img->bm.width, 256 0, 0, img->bm.width,
255 x, y, width, height); 257 x, y, width, height);
256#if LCD_DEPTH > 1 258#if LCD_DEPTH > 1
257 } else { 259 } else {
258 display->transparent_bitmap_part((fb_data *)img->bm.data, 260 display->transparent_bitmap_part((fb_data *)img_data,
259 0, 0, 261 0, 0,
260 STRIDE(display->screen_type, 262 STRIDE(display->screen_type,
261 img->bm.width, img->bm.height), 263 img->bm.width, img->bm.height),
@@ -268,9 +270,13 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb)
268 if (!pb->nobar) 270 if (!pb->nobar)
269 { 271 {
270 if (pb->image) 272 if (pb->image)
273 {
274 char *img_data = core_get_data(pb->image->buflib_handle);
275 pb->image->bm.data = img_data;
271 gui_bitmap_scrollbar_draw(display, &pb->image->bm, 276 gui_bitmap_scrollbar_draw(display, &pb->image->bm,
272 x, y, width, height, 277 x, y, width, height,
273 length, 0, end, flags); 278 length, 0, end, flags);
279 }
274 else 280 else
275 gui_scrollbar_draw(display, x, y, width, height, 281 gui_scrollbar_draw(display, x, y, width, height,
276 length, 0, end, flags); 282 length, 0, end, flags);
@@ -281,6 +287,7 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb)
281 int xoff = 0, yoff = 0; 287 int xoff = 0, yoff = 0;
282 int w = width, h = height; 288 int w = width, h = height;
283 struct gui_img *img = pb->slider; 289 struct gui_img *img = pb->slider;
290 char *img_data = core_get_data(img->buflib_handle);
284 291
285 if (flags&HORIZONTAL) 292 if (flags&HORIZONTAL)
286 { 293 {
@@ -301,12 +308,12 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb)
301#if LCD_DEPTH > 1 308#if LCD_DEPTH > 1
302 if(img->bm.format == FORMAT_MONO) { 309 if(img->bm.format == FORMAT_MONO) {
303#endif 310#endif
304 display->mono_bitmap_part(img->bm.data, 311 display->mono_bitmap_part(img_data,
305 0, 0, img->bm.width, 312 0, 0, img->bm.width,
306 x + xoff, y + yoff, w, h); 313 x + xoff, y + yoff, w, h);
307#if LCD_DEPTH > 1 314#if LCD_DEPTH > 1
308 } else { 315 } else {
309 display->transparent_bitmap_part((fb_data *)img->bm.data, 316 display->transparent_bitmap_part((fb_data *)img_data,
310 0, 0, 317 0, 0,
311 STRIDE(display->screen_type, 318 STRIDE(display->screen_type,
312 img->bm.width, img->bm.height), 319 img->bm.width, img->bm.height),
@@ -350,6 +357,7 @@ void clear_image_pos(struct gui_wps *gwps, struct gui_img *img)
350void wps_draw_image(struct gui_wps *gwps, struct gui_img *img, int subimage) 357void wps_draw_image(struct gui_wps *gwps, struct gui_img *img, int subimage)
351{ 358{
352 struct screen *display = gwps->display; 359 struct screen *display = gwps->display;
360 char *img_data = core_get_data(img->buflib_handle);
353 if(img->always_display) 361 if(img->always_display)
354 display->set_drawmode(DRMODE_FG); 362 display->set_drawmode(DRMODE_FG);
355 else 363 else
@@ -358,14 +366,14 @@ void wps_draw_image(struct gui_wps *gwps, struct gui_img *img, int subimage)
358#if LCD_DEPTH > 1 366#if LCD_DEPTH > 1
359 if(img->bm.format == FORMAT_MONO) { 367 if(img->bm.format == FORMAT_MONO) {
360#endif 368#endif
361 display->mono_bitmap_part(img->bm.data, 369 display->mono_bitmap_part(img_data,
362 0, img->subimage_height * subimage, 370 0, img->subimage_height * subimage,
363 img->bm.width, img->x, 371 img->bm.width, img->x,
364 img->y, img->bm.width, 372 img->y, img->bm.width,
365 img->subimage_height); 373 img->subimage_height);
366#if LCD_DEPTH > 1 374#if LCD_DEPTH > 1
367 } else { 375 } else {
368 display->transparent_bitmap_part((fb_data *)img->bm.data, 376 display->transparent_bitmap_part((fb_data *)img_data,
369 0, img->subimage_height * subimage, 377 0, img->subimage_height * subimage,
370 STRIDE(display->screen_type, 378 STRIDE(display->screen_type,
371 img->bm.width, img->bm.height), 379 img->bm.width, img->bm.height),