forked from KolibriOS/kolibrios
Fixed unaligned text problem
git-svn-id: svn://kolibrios.org@4824 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
cbeff23cbd
commit
4f36d073fd
@ -13,7 +13,7 @@
|
||||
;; ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
version equ '0.22'
|
||||
version equ '0.23'
|
||||
|
||||
; connection status
|
||||
STATUS_DISCONNECTED = 0
|
||||
@ -24,6 +24,7 @@ STATUS_CONNECTED = 3
|
||||
; window flags
|
||||
FLAG_UPDATED = 1 shl 0
|
||||
FLAG_RECEIVING_NAMES = 1 shl 1
|
||||
FLAG_SCROLL_LOW = 1 shl 2
|
||||
|
||||
; window types
|
||||
WINDOWTYPE_NONE = 0
|
||||
@ -412,7 +413,13 @@ mouse:
|
||||
push dword scroll2
|
||||
call [scrollbar_mouse]
|
||||
mov edi, [window_active]
|
||||
and [edi+window.flags], not FLAG_SCROLL_LOW
|
||||
mov edx, [scroll2.position]
|
||||
add edx, [scroll2.cur_area]
|
||||
sub edx, [scroll2.max_area]
|
||||
jne @f
|
||||
or [edi+window.flags], FLAG_SCROLL_LOW
|
||||
@@: mov edx, [scroll2.position]
|
||||
sub edx, [edi + window.text_line_print]
|
||||
je @f
|
||||
call draw_channel_text.scroll_to_pos
|
||||
|
@ -179,12 +179,13 @@ draw_channel_text:
|
||||
mov [edi + window.text_scanned], esi
|
||||
|
||||
; Is scrollbar at lowest position?
|
||||
mov edx, [scroll2.position]
|
||||
test edx, edx
|
||||
jz .yesscroll
|
||||
add edx, [scroll2.cur_area]
|
||||
sub edx, [scroll2.max_area]
|
||||
jne .noscroll
|
||||
test [edi + window.flags], FLAG_SCROLL_LOW
|
||||
jnz .yesscroll ;Yes
|
||||
cmp [scroll2.all_redraw], 1 ;No
|
||||
jnz .noscroll
|
||||
mov edx, [textbox_height]
|
||||
sub edx, [edi + window.text_line_print]
|
||||
jg .noscroll
|
||||
.yesscroll:
|
||||
; Scrollbar was at lowest position, scroll down automatically when new text arrived.
|
||||
mov edx, [edi + window.text_lines]
|
||||
|
@ -36,6 +36,7 @@ window_create_textbox:
|
||||
|
||||
mov [ebx + window.data_ptr], eax
|
||||
mov [ebx + window.flags], 0
|
||||
or [ebx + window.flags], FLAG_SCROLL_LOW
|
||||
|
||||
add eax, window_data.text+2 ; let text begin at offset 2, this way the text will be prepended with two null bytes
|
||||
mov [ebx + window.text_start], eax
|
||||
|
Loading…
Reference in New Issue
Block a user