summaryrefslogtreecommitdiff
path: root/apps/gui/icon.c
diff options
context:
space:
mode:
authorTomer Shalev <shalev.tomer@gmail.com>2009-10-05 23:41:59 +0000
committerTomer Shalev <shalev.tomer@gmail.com>2009-10-05 23:41:59 +0000
commit6a12b82a8533e8e0a835f6d1ee1e1076f8ef2df6 (patch)
tree1e4cab476a51ea2c58df0dba7784b80bea32eee1 /apps/gui/icon.c
parentfa69df3324847b4bac34a54e58ac566dcc51835a (diff)
downloadrockbox-6a12b82a8533e8e0a835f6d1ee1e1076f8ef2df6.zip
rockbox-6a12b82a8533e8e0a835f6d1ee1e1076f8ef2df6.tar.gz
rockbox-6a12b82a8533e8e0a835f6d1ee1e1076f8ef2df6.tar.bz2
rockbox-6a12b82a8533e8e0a835f6d1ee1e1076f8ef2df6.tar.xz
Fine tuning of gui elements positioning in RTL mode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22976 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/icon.c')
-rw-r--r--apps/gui/icon.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/gui/icon.c b/apps/gui/icon.c
index e57ad29..73c0fb5 100644
--- a/apps/gui/icon.c
+++ b/apps/gui/icon.c
@@ -125,12 +125,15 @@ void screen_put_iconxy(struct screen * display,
const int screen = display->screen_type;
const int width = ICON_WIDTH(screen);
const int height = ICON_HEIGHT(screen);
+ const int is_rtl = lang_is_rtl();
int stride;
const struct bitmap *iconset;
screen_bitmap_part_func *draw_func = NULL;
if (icon == Icon_NOICON)
{
+ if (is_rtl)
+ xpos = display->getwidth() - xpos - width;
screen_clear_area(display, xpos, ypos, width, height);
return;
}
@@ -164,7 +167,7 @@ void screen_put_iconxy(struct screen * display,
if (xpos == 0)
xpos++;
- if (lang_is_rtl())
+ if (is_rtl)
xpos = display->getwidth() - xpos - width;
#if (LCD_DEPTH == 16) || defined(LCD_REMOTE_DEPTH) && (LCD_REMOTE_DEPTH == 16)