summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/list.c20
-rw-r--r--apps/gui/list.h4
2 files changed, 3 insertions, 21 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 98e9fe0ada..4779d5309a 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -47,10 +47,6 @@
47 */ 47 */
48#define FRAMEDROP_TRIGGER 6 48#define FRAMEDROP_TRIGGER 6
49 49
50static int offset_step = 16; /* pixels per screen scroll step */
51/* should lines scroll out of the screen */
52static bool offset_out_of_view = false;
53
54static void gui_list_select_at_offset(struct gui_synclist * gui_list, 50static void gui_list_select_at_offset(struct gui_synclist * gui_list,
55 int offset); 51 int offset);
56void list_draw(struct screen *display, struct gui_synclist *list); 52void list_draw(struct screen *display, struct gui_synclist *list);
@@ -207,7 +203,7 @@ int gui_list_get_item_offset(struct gui_synclist * gui_list,
207{ 203{
208 int item_offset; 204 int item_offset;
209 205
210 if (offset_out_of_view) 206 if (global_settings.offset_out_of_view)
211 { 207 {
212 item_offset = gui_list->offset_position[display->screen_type]; 208 item_offset = gui_list->offset_position[display->screen_type];
213 } 209 }
@@ -439,16 +435,6 @@ void gui_synclist_del_item(struct gui_synclist * gui_list)
439 } 435 }
440} 436}
441 437
442void gui_list_screen_scroll_step(int ofs)
443{
444 offset_step = ofs;
445}
446
447void gui_list_screen_scroll_out_of_view(bool enable)
448{
449 offset_out_of_view = enable;
450}
451
452/* 438/*
453 * Set the title and title icon of the list. Setting title to NULL disables 439 * Set the title and title icon of the list. Setting title to NULL disables
454 * both the title and icon. Use NOICON if there is no icon. 440 * both the title and icon. Use NOICON if there is no icon.
@@ -556,7 +542,7 @@ static void gui_synclist_scroll_right(struct gui_synclist * lists)
556 /* FIXME: This is a fake right boundry limiter. there should be some 542 /* FIXME: This is a fake right boundry limiter. there should be some
557 * callback function to find the longest item on the list in pixels, 543 * callback function to find the longest item on the list in pixels,
558 * to stop the list from scrolling past that point */ 544 * to stop the list from scrolling past that point */
559 lists->offset_position[i] += offset_step; 545 lists->offset_position[i] += global_settings.screen_scroll_step;
560 if (lists->offset_position[i] > 1000) 546 if (lists->offset_position[i] > 1000)
561 lists->offset_position[i] = 1000; 547 lists->offset_position[i] = 1000;
562 } 548 }
@@ -570,7 +556,7 @@ static void gui_synclist_scroll_left(struct gui_synclist * lists)
570{ 556{
571 FOR_NB_SCREENS(i) 557 FOR_NB_SCREENS(i)
572 { 558 {
573 lists->offset_position[i] -= offset_step; 559 lists->offset_position[i] -= global_settings.screen_scroll_step;
574 if (lists->offset_position[i] < 0) 560 if (lists->offset_position[i] < 0)
575 lists->offset_position[i] = 0; 561 lists->offset_position[i] = 0;
576 } 562 }
diff --git a/apps/gui/list.h b/apps/gui/list.h
index 388e3d2006..e514f7252e 100644
--- a/apps/gui/list.h
+++ b/apps/gui/list.h
@@ -198,11 +198,7 @@ struct gui_synclist
198 198
199 199
200extern void list_init(void); 200extern void list_init(void);
201/* parse global setting to static int */
202extern void gui_list_screen_scroll_step(int ofs);
203 201
204/* parse global setting to static bool */
205extern void gui_list_screen_scroll_out_of_view(bool enable);
206extern void gui_synclist_init_display_settings(struct gui_synclist * list); 202extern void gui_synclist_init_display_settings(struct gui_synclist * list);
207extern void gui_synclist_init( 203extern void gui_synclist_init(
208 struct gui_synclist * lists, 204 struct gui_synclist * lists,