diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/bitmap/list.c | 11 | ||||
-rw-r--r-- | apps/gui/viewport.c | 4 |
2 files changed, 7 insertions, 8 deletions
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c index f0eb2ec160..986fcaea69 100644 --- a/apps/gui/bitmap/list.c +++ b/apps/gui/bitmap/list.c | |||
@@ -42,7 +42,6 @@ | |||
42 | #include "viewport.h" | 42 | #include "viewport.h" |
43 | 43 | ||
44 | #define ICON_PADDING 1 | 44 | #define ICON_PADDING 1 |
45 | #define IS_RTL(vp) (((vp)->flags & VP_IS_RTL) != 0) | ||
46 | 45 | ||
47 | /* these are static to make scrolling work */ | 46 | /* these are static to make scrolling work */ |
48 | static struct viewport list_text[NB_SCREENS], title_text[NB_SCREENS]; | 47 | static struct viewport list_text[NB_SCREENS], title_text[NB_SCREENS]; |
@@ -83,7 +82,7 @@ static bool draw_title(struct screen *display, struct gui_synclist *list) | |||
83 | struct viewport title_icon = *title_text_vp; | 82 | struct viewport title_icon = *title_text_vp; |
84 | 83 | ||
85 | title_icon.width = get_icon_width(screen) + ICON_PADDING * 2; | 84 | title_icon.width = get_icon_width(screen) + ICON_PADDING * 2; |
86 | if (IS_RTL(&title_icon)) | 85 | if (VP_IS_RTL(&title_icon)) |
87 | { | 86 | { |
88 | title_icon.x = title_text_vp->width - title_icon.width; | 87 | title_icon.x = title_text_vp->width - title_icon.width; |
89 | } | 88 | } |
@@ -155,19 +154,19 @@ void list_draw(struct screen *display, struct gui_synclist *list) | |||
155 | else | 154 | else |
156 | vp.x += list_text_vp->width; | 155 | vp.x += list_text_vp->width; |
157 | display->set_viewport(&vp); | 156 | display->set_viewport(&vp); |
158 | gui_scrollbar_draw(display, IS_RTL(&vp) ? 1 : 0, 0, SCROLLBAR_WIDTH-1, vp.height, | 157 | gui_scrollbar_draw(display, VP_IS_RTL(&vp) ? 1 : 0, 0, SCROLLBAR_WIDTH-1, vp.height, |
159 | list->nb_items, list_start_item, list_start_item + end-start, | 158 | list->nb_items, list_start_item, list_start_item + end-start, |
160 | VERTICAL); | 159 | VERTICAL); |
161 | } | 160 | } |
162 | else if (show_title) | 161 | else if (show_title) |
163 | { | 162 | { |
164 | /* shift everything a bit in relation to the title... */ | 163 | /* shift everything a bit in relation to the title... */ |
165 | if (!IS_RTL(list_text_vp) && scrollbar_in_left) | 164 | if (!VP_IS_RTL(list_text_vp) && scrollbar_in_left) |
166 | { | 165 | { |
167 | list_text_vp->width -= SCROLLBAR_WIDTH; | 166 | list_text_vp->width -= SCROLLBAR_WIDTH; |
168 | list_text_vp->x += SCROLLBAR_WIDTH; | 167 | list_text_vp->x += SCROLLBAR_WIDTH; |
169 | } | 168 | } |
170 | else if (IS_RTL(list_text_vp) && !scrollbar_in_left) | 169 | else if (VP_IS_RTL(list_text_vp) && !scrollbar_in_left) |
171 | { | 170 | { |
172 | list_text_vp->width -= SCROLLBAR_WIDTH; | 171 | list_text_vp->width -= SCROLLBAR_WIDTH; |
173 | } | 172 | } |
@@ -183,7 +182,7 @@ void list_draw(struct screen *display, struct gui_synclist *list) | |||
183 | { | 182 | { |
184 | list_icons.width = icon_width * icon_count; | 183 | list_icons.width = icon_width * icon_count; |
185 | list_text_vp->width -= list_icons.width + ICON_PADDING; | 184 | list_text_vp->width -= list_icons.width + ICON_PADDING; |
186 | if (IS_RTL(&list_icons)) | 185 | if (VP_IS_RTL(&list_icons)) |
187 | list_icons.x += list_text_vp->width + ICON_PADDING; | 186 | list_icons.x += list_text_vp->width + ICON_PADDING; |
188 | else | 187 | else |
189 | list_text_vp->x += list_icons.width + ICON_PADDING; | 188 | list_text_vp->x += list_icons.width + ICON_PADDING; |
diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c index 1db1a810da..6e1541021d 100644 --- a/apps/gui/viewport.c +++ b/apps/gui/viewport.c | |||
@@ -151,8 +151,8 @@ void viewport_set_defaults(struct viewport *vp, enum screen_type screen) | |||
151 | viewport_set_fullscreen(vp, screen); | 151 | viewport_set_fullscreen(vp, screen); |
152 | 152 | ||
153 | #ifdef HAVE_LCD_BITMAP | 153 | #ifdef HAVE_LCD_BITMAP |
154 | vp->flags &= ~VP_IS_RTL; | 154 | vp->flags &= ~VP_FLAG_IS_RTL; |
155 | vp->flags |= lang_is_rtl() ? VP_IS_RTL : 0; | 155 | vp->flags |= lang_is_rtl() ? VP_FLAG_IS_RTL : 0; |
156 | #endif | 156 | #endif |
157 | } | 157 | } |
158 | 158 | ||