Box_Lib - fix for scrollbar.

git-svn-id: svn://kolibrios.org@3353 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2013-03-08 13:10:46 +00:00
parent 6501c791a6
commit 54727d8096

View File

@ -468,6 +468,13 @@ scroll_bar_exit
imul eax,sb_cur_area imul eax,sb_cur_area
xor edx,edx xor edx,edx
div ebx div ebx
shl edx,1
cmp edx,ebx
jb @f
inc eax
@@:
cmp eax,10 cmp eax,10
jae @f jae @f
mov eax,10 mov eax,10
@ -489,6 +496,13 @@ scroll_bar_exit
imul eax,sb_position imul eax,sb_position
xor edx,edx xor edx,edx
div ebx div ebx
shl edx,1
cmp edx,ebx
jb @f
inc eax
@@:
.@@_1: .@@_1:
mov sb_position2,eax mov sb_position2,eax
xor edx,edx xor edx,edx
@ -974,6 +988,15 @@ draw_down_arrow_vertical
@@: @@:
.store_position: .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 mov sb_position,eax
.all_sb: .all_sb:
mov sb_redraw,dword 1 mov sb_redraw,dword 1
@ -1046,6 +1069,13 @@ scroll_bar_exit
imul eax,sb_cur_area imul eax,sb_cur_area
xor edx,edx xor edx,edx
div ebx div ebx
shl edx,1
cmp edx,ebx
jb @f
inc eax
@@:
cmp eax,10 cmp eax,10
jae @f jae @f
mov eax,10 mov eax,10
@ -1067,6 +1097,13 @@ scroll_bar_exit
imul eax,sb_position imul eax,sb_position
xor edx,edx xor edx,edx
div ebx div ebx
shl edx,1
cmp edx,ebx
jb @f
inc eax
@@:
.@@_1: .@@_1:
mov sb_position2,eax mov sb_position2,eax
xor edx,edx xor edx,edx
@ -1560,6 +1597,15 @@ draw_down_arrow_horizontal
@@: @@:
.store_position: .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 mov sb_position,eax
.all_sb: .all_sb:
mov sb_redraw,dword 1 mov sb_redraw,dword 1