diff options
author | Thomas Martitz <kugel@rockbox.org> | 2014-04-18 13:27:25 +0200 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2014-04-18 13:27:25 +0200 |
commit | 532b8141ab24f386e35f389277b4f3bc67211ed5 (patch) | |
tree | 7c26eb33592632aac782044f28b09ea60d976230 /apps/gui | |
parent | 35b4ba851344dec00d8af7bdac20ed337e100917 (diff) | |
download | rockbox-532b8141ab24f386e35f389277b4f3bc67211ed5.tar.gz rockbox-532b8141ab24f386e35f389277b4f3bc67211ed5.zip |
skin_engine: Make %Vs affect the whole line.
Previously %Vs styles only took effect upon the first character of text, i.e.
on the right if the line is %arXXX. Now the style is applied for the whole
line width.
Fixes FS#12973.
Change-Id: I95f2cc76a90bfc0779e5a667d5bfa54c33896c89
Diffstat (limited to 'apps/gui')
-rwxr-xr-x | apps/gui/skin_engine/skin_display.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index 60557bba0d..501d3a305a 100755 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c | |||
@@ -604,15 +604,15 @@ void write_line(struct screen *display, struct align_pos *format_align, | |||
604 | center_xpos = (viewport_width-center_width)/2; | 604 | center_xpos = (viewport_width-center_width)/2; |
605 | right_xpos = viewport_width-right_width; | 605 | right_xpos = viewport_width-right_width; |
606 | #endif | 606 | #endif |
607 | /* print aligned strings */ | 607 | /* print aligned strings. print whole line at once so that %Vs works |
608 | if (left_width != 0) | 608 | * across the full viewport width */ |
609 | display->put_line(0, line, linedes, "$t", format_align->left); | 609 | char *left = format_align->left ?: ""; |
610 | 610 | char *center = format_align->center ?: ""; | |
611 | if (center_width != 0) | 611 | char *right = format_align->right ?: ""; |
612 | display->put_line(center_xpos, line, linedes, "$t", format_align->center); | 612 | |
613 | 613 | display->put_line(0, line, linedes, "$t$*s$t$*s$t", left, | |
614 | if (right_width != 0) | 614 | center_xpos - left_width, center, |
615 | display->put_line(right_xpos, line, linedes, "$t", format_align->right); | 615 | right_xpos - (center_xpos + center_width), right); |
616 | } | 616 | } |
617 | } | 617 | } |
618 | 618 | ||