mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
cc_frm correct scroll direction if more than 2 pages (thx dbo)
Signed-off-by: Thilo Graf <dbt@novatux.de> picked from: github.com/TangoCash/neutrino-mp-cst-next commit: abce1c6be4bae17f343d3ff878670184708aa185
This commit is contained in:
@@ -636,9 +636,9 @@ void CComponentsForm::ScrollPage(int direction, bool do_paint)
|
|||||||
int target_page_id = (int)page_count - 1;
|
int target_page_id = (int)page_count - 1;
|
||||||
int target_page = (int)cur_page;
|
int target_page = (int)cur_page;
|
||||||
|
|
||||||
if (direction == SCROLL_P_DOWN)
|
if (direction == SCROLL_P_UP)
|
||||||
target_page = target_page+1 > target_page_id ? 0 : target_page+1;
|
target_page = target_page+1 > target_page_id ? 0 : target_page+1;
|
||||||
else if (direction == SCROLL_P_UP)
|
else if (direction == SCROLL_P_DOWN)
|
||||||
target_page = target_page-1 < 0 ? target_page_id : target_page-1;
|
target_page = target_page-1 < 0 ? target_page_id : target_page-1;
|
||||||
|
|
||||||
if (do_paint)
|
if (do_paint)
|
||||||
|
Reference in New Issue
Block a user