diff options
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/bitmap/list-skinned.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/apps/gui/bitmap/list-skinned.c b/apps/gui/bitmap/list-skinned.c index 47bfec3608..38004dc732 100644 --- a/apps/gui/bitmap/list-skinned.c +++ b/apps/gui/bitmap/list-skinned.c | |||
@@ -200,8 +200,7 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list) | |||
200 | viewport; | 200 | viewport; |
201 | viewport = SKINOFFSETTOPTR(get_skin_buffer(wps.data), viewport->next)) | 201 | viewport = SKINOFFSETTOPTR(get_skin_buffer(wps.data), viewport->next)) |
202 | { | 202 | { |
203 | int origional_x, origional_y; | 203 | int original_x, original_y; |
204 | int origional_w, origional_h; | ||
205 | skin_viewport = SKINOFFSETTOPTR(get_skin_buffer(wps.data), viewport->data); | 204 | skin_viewport = SKINOFFSETTOPTR(get_skin_buffer(wps.data), viewport->data); |
206 | char *viewport_label = SKINOFFSETTOPTR(get_skin_buffer(wps.data), skin_viewport->label); | 205 | char *viewport_label = SKINOFFSETTOPTR(get_skin_buffer(wps.data), skin_viewport->label); |
207 | if (viewport->children == 0 || !viewport_label || | 206 | if (viewport->children == 0 || !viewport_label || |
@@ -213,24 +212,22 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list) | |||
213 | memcpy(&listcfg[screen]->selected_item_vp, skin_viewport, sizeof(struct skin_viewport)); | 212 | memcpy(&listcfg[screen]->selected_item_vp, skin_viewport, sizeof(struct skin_viewport)); |
214 | skin_viewport = &listcfg[screen]->selected_item_vp; | 213 | skin_viewport = &listcfg[screen]->selected_item_vp; |
215 | } | 214 | } |
216 | origional_x = skin_viewport->vp.x; | 215 | original_x = skin_viewport->vp.x; |
217 | origional_y = skin_viewport->vp.y; | 216 | original_y = skin_viewport->vp.y; |
218 | origional_w = skin_viewport->vp.width; | ||
219 | origional_h = skin_viewport->vp.height; | ||
220 | if (listcfg[screen]->tile) | 217 | if (listcfg[screen]->tile) |
221 | { | 218 | { |
222 | int cols = (parent->width / listcfg[screen]->width); | 219 | int cols = (parent->width / listcfg[screen]->width); |
223 | current_column = (cur_line)%cols; | 220 | current_column = (cur_line)%cols; |
224 | current_row = (cur_line)/cols; | 221 | current_row = (cur_line)/cols; |
225 | 222 | ||
226 | skin_viewport->vp.x = parent->x + listcfg[screen]->width*current_column + origional_x; | 223 | skin_viewport->vp.x = parent->x + listcfg[screen]->width*current_column + original_x; |
227 | skin_viewport->vp.y = parent->y + listcfg[screen]->height*current_row + origional_y; | 224 | skin_viewport->vp.y = parent->y + listcfg[screen]->height*current_row + original_y; |
228 | } | 225 | } |
229 | else | 226 | else |
230 | { | 227 | { |
231 | current_row = cur_line; | 228 | current_row = cur_line; |
232 | skin_viewport->vp.x = parent->x + origional_x; | 229 | skin_viewport->vp.x = parent->x + original_x; |
233 | skin_viewport->vp.y = parent->y + origional_y + | 230 | skin_viewport->vp.y = parent->y + original_y + |
234 | (listcfg[screen]->height*cur_line); | 231 | (listcfg[screen]->height*cur_line); |
235 | } | 232 | } |
236 | display->set_viewport(&skin_viewport->vp); | 233 | display->set_viewport(&skin_viewport->vp); |
@@ -255,10 +252,8 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list) | |||
255 | if (!is_selected) | 252 | if (!is_selected) |
256 | { | 253 | { |
257 | display->scroll_stop(&skin_viewport->vp); | 254 | display->scroll_stop(&skin_viewport->vp); |
258 | skin_viewport->vp.x = origional_x; | 255 | skin_viewport->vp.x = original_x; |
259 | skin_viewport->vp.y = origional_y; | 256 | skin_viewport->vp.y = original_y; |
260 | skin_viewport->vp.width = origional_w; | ||
261 | skin_viewport->vp.height = origional_h; | ||
262 | } | 257 | } |
263 | } | 258 | } |
264 | } | 259 | } |