From 7a009276bc136ca8889f561b7002e7d94c2a9885 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Wed, 30 May 2012 21:16:35 +1000 Subject: [PATCH] Fix FS#12674 - %ax() doesnt mirror viewport correctly Change-Id: I10c933542037eeedc9c4be74b3d43a1430ec05b2 --- apps/gui/skin_engine/skin_parser.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index e364cf1c76..4784039a87 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -1946,6 +1946,10 @@ static int convert_viewport(struct wps_data *data, struct skin_element* element) skin_vp->vp.height + skin_vp->vp.y > display->lcdheight) return CALLBACK_ERROR; + /* Fix x position for RTL languages */ + if (follow_lang_direction && lang_is_rtl()) + skin_vp->vp.x = display->lcdwidth - skin_vp->vp.x - skin_vp->vp.width; + return CALLBACK_OK; }