From d6c6c0767cdf78e98789c067d680e09804641c82 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Tue, 15 Jan 2013 23:10:37 +1100 Subject: album art display: Fix RTL handling for the album art skin tag AA was broken when an RTL language is used, causing it to not be displayed. Also fix th out of bounds handling when width/height > viewport Change-Id: I4899cd32ec58107c987e3cc0e8df582963bdcf62 --- apps/gui/skin_engine/skin_parser.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 94adaf3116..adfda54335 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -1197,16 +1197,16 @@ static int parse_albumart_load(struct skin_element* element, /* if we got here, we parsed everything ok .. ! */ if (aa->width < 0) aa->width = 0; - else if (aa->width > LCD_WIDTH) - aa->width = LCD_WIDTH; + else if (aa->width > curr_vp->vp.width) + aa->width = curr_vp->vp.width; if (aa->height < 0) aa->height = 0; - else if (aa->height > LCD_HEIGHT) - aa->height = LCD_HEIGHT; + else if (aa->height > curr_vp->vp.height) + aa->height = curr_vp->vp.height; if (swap_for_rtl) - aa->x = LCD_WIDTH - (aa->x + aa->width); + aa->x = (curr_vp->vp.width - aa->width - aa->x); aa->state = WPS_ALBUMART_LOAD; wps_data->albumart = PTRTOSKINOFFSET(skin_buffer, aa); -- cgit v1.2.3