diff options
Diffstat (limited to 'apps/gui/skin_engine/skin_display.c')
-rw-r--r-- | apps/gui/skin_engine/skin_display.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index a967114125..02e9d39711 100644 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c | |||
@@ -450,15 +450,12 @@ int evaluate_conditional(struct gui_wps *gwps, int offset, | |||
450 | line is the index of the line on the screen. | 450 | line is the index of the line on the screen. |
451 | scroll indicates whether the line is a scrolling one or not. | 451 | scroll indicates whether the line is a scrolling one or not. |
452 | */ | 452 | */ |
453 | void write_line(struct screen *display, | 453 | void write_line(struct screen *display, struct align_pos *format_align, |
454 | struct align_pos *format_align, | 454 | int line, bool scroll, unsigned style) |
455 | int line, | ||
456 | bool scroll) | ||
457 | { | 455 | { |
458 | int left_width = 0, left_xpos; | 456 | int left_width = 0, left_xpos; |
459 | int center_width = 0, center_xpos; | 457 | int center_width = 0, center_xpos; |
460 | int right_width = 0, right_xpos; | 458 | int right_width = 0, right_xpos; |
461 | int ypos; | ||
462 | int space_width; | 459 | int space_width; |
463 | int string_height; | 460 | int string_height; |
464 | int scroll_width; | 461 | int scroll_width; |
@@ -565,22 +562,19 @@ void write_line(struct screen *display, | |||
565 | right_width = 0; | 562 | right_width = 0; |
566 | } | 563 | } |
567 | 564 | ||
568 | ypos = (line * string_height); | ||
569 | |||
570 | |||
571 | if (scroll && ((left_width > scroll_width) || | 565 | if (scroll && ((left_width > scroll_width) || |
572 | (center_width > scroll_width) || | 566 | (center_width > scroll_width) || |
573 | (right_width > scroll_width))) | 567 | (right_width > scroll_width))) |
574 | { | 568 | { |
575 | display->puts_scroll(0, line, | 569 | display->puts_scroll_style(0, line, |
576 | (unsigned char *)format_align->left); | 570 | (unsigned char *)format_align->left, style); |
577 | } | 571 | } |
578 | else | 572 | else |
579 | { | 573 | { |
580 | #ifdef HAVE_LCD_BITMAP | 574 | #ifdef HAVE_LCD_BITMAP |
581 | /* clear the line first */ | 575 | /* clear the line first */ |
582 | display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 576 | display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
583 | display->fillrect(left_xpos, ypos, display->getwidth(), string_height); | 577 | display->fillrect(left_xpos, line*string_height, display->getwidth(), string_height); |
584 | display->set_drawmode(DRMODE_SOLID); | 578 | display->set_drawmode(DRMODE_SOLID); |
585 | #endif | 579 | #endif |
586 | 580 | ||
@@ -591,18 +585,19 @@ void write_line(struct screen *display, | |||
591 | /* print aligned strings */ | 585 | /* print aligned strings */ |
592 | if (left_width != 0) | 586 | if (left_width != 0) |
593 | { | 587 | { |
594 | display->putsxy(left_xpos, ypos, | 588 | display->puts_style_xyoffset(left_xpos/space_width, line, |
595 | (unsigned char *)format_align->left); | 589 | (unsigned char *)format_align->left, style, 0, 0); |
590 | |||
596 | } | 591 | } |
597 | if (center_width != 0) | 592 | if (center_width != 0) |
598 | { | 593 | { |
599 | display->putsxy(center_xpos, ypos, | 594 | display->puts_style_xyoffset(center_xpos/space_width, line, |
600 | (unsigned char *)format_align->center); | 595 | (unsigned char *)format_align->center, style, 0, 0); |
601 | } | 596 | } |
602 | if (right_width != 0) | 597 | if (right_width != 0) |
603 | { | 598 | { |
604 | display->putsxy(right_xpos, ypos, | 599 | display->puts_style_xyoffset(right_xpos/space_width, line, |
605 | (unsigned char *)format_align->right); | 600 | (unsigned char *)format_align->right, style, 0, 0); |
606 | } | 601 | } |
607 | } | 602 | } |
608 | } | 603 | } |