From 54727d80964a4cfe593697a36c36bc51d1ad79ac Mon Sep 17 00:00:00 2001 From: "Marat Zakiyanov (Mario79)" Date: Fri, 8 Mar 2013 13:10:46 +0000 Subject: [PATCH] Box_Lib - fix for scrollbar. git-svn-id: svn://kolibrios.org@3353 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../libraries/box_lib/trunk/scrollbar.mac | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/programs/develop/libraries/box_lib/trunk/scrollbar.mac b/programs/develop/libraries/box_lib/trunk/scrollbar.mac index 7e46295e8a..809a36dfe1 100644 --- a/programs/develop/libraries/box_lib/trunk/scrollbar.mac +++ b/programs/develop/libraries/box_lib/trunk/scrollbar.mac @@ -468,6 +468,13 @@ scroll_bar_exit imul eax,sb_cur_area xor edx,edx div ebx + shl edx,1 + cmp edx,ebx + jb @f + + inc eax + +@@: cmp eax,10 jae @f mov eax,10 @@ -489,6 +496,13 @@ scroll_bar_exit imul eax,sb_position xor edx,edx div ebx + shl edx,1 + cmp edx,ebx + jb @f + + inc eax + +@@: .@@_1: mov sb_position2,eax xor edx,edx @@ -974,6 +988,15 @@ draw_down_arrow_vertical @@: .store_position: + mov edx,sb_max_area + sub edx,sb_cur_area + cmp edx,eax + ja @f + + mov sb_position,edx + jmp .all_sb + +@@: mov sb_position,eax .all_sb: mov sb_redraw,dword 1 @@ -1046,6 +1069,13 @@ scroll_bar_exit imul eax,sb_cur_area xor edx,edx div ebx + shl edx,1 + cmp edx,ebx + jb @f + + inc eax + +@@: cmp eax,10 jae @f mov eax,10 @@ -1067,6 +1097,13 @@ scroll_bar_exit imul eax,sb_position xor edx,edx div ebx + shl edx,1 + cmp edx,ebx + jb @f + + inc eax + +@@: .@@_1: mov sb_position2,eax xor edx,edx @@ -1560,6 +1597,15 @@ draw_down_arrow_horizontal @@: .store_position: + mov edx,sb_max_area + sub edx,sb_cur_area + cmp edx,eax + ja @f + + mov sb_position,edx + jmp .all_sb + +@@: mov sb_position,eax .all_sb: mov sb_redraw,dword 1