From eb20149804a74db8cc0fc1c3d81c25d37e2db947 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sun, 4 Nov 2007 10:51:11 +0000 Subject: [PATCH] minor touchpad tweaking... lists - dont do ACTION_STD_OK if pressing an area under the last item colour chooser - change the seelcted colour straight away without having to swicth sliders first git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15455 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/color_picker.c | 5 ++--- apps/gui/list.c | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/gui/color_picker.c b/apps/gui/color_picker.c index ce89655e97..6dc33a22d9 100644 --- a/apps/gui/color_picker.c +++ b/apps/gui/color_picker.c @@ -378,10 +378,9 @@ int touchpad_slider(struct rgb_pick *rgb, int *selected_slider) if (button == BUTTON_REL) return ACTION_STD_OK; } - if ((button == BUTTON_REL) && - pressed_slider != *selected_slider) + if (pressed_slider != *selected_slider) *selected_slider = pressed_slider; - else if (pressed_slider == *selected_slider) + //if (pressed_slider == *selected_slider) { x -= slider_left; rgb->rgb_val[pressed_slider] = diff --git a/apps/gui/list.c b/apps/gui/list.c index 436038e5c2..153e500d92 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c @@ -986,7 +986,11 @@ unsigned gui_synclist_do_touchpad(struct gui_synclist * lists) pressing the selected item will "enter" it */ line = y / gui_list->display->char_height; if (line != gui_list->selected_item - gui_list->start_item) + { + if (gui_list->start_item+line > gui_list->nb_items) + return ACTION_NONE; gui_synclist_select_item(lists, gui_list->start_item+line); + } if (button == BUTTON_REPEAT) return ACTION_STD_CONTEXT;