From fb96b1323e632fd0f208215147835862bac55559 Mon Sep 17 00:00:00 2001 From: gtament Date: Sun, 13 Apr 2014 10:19:01 +0000 Subject: [PATCH] Now fixed unaligned text problem in IRCc even for small screen resolutions git-svn-id: svn://kolibrios.org@4827 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/network/ircc/textbox.inc | 5 +++-- programs/network/ircc/window.inc | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/programs/network/ircc/textbox.inc b/programs/network/ircc/textbox.inc index 3c1f7e372c..7397d571fa 100644 --- a/programs/network/ircc/textbox.inc +++ b/programs/network/ircc/textbox.inc @@ -184,8 +184,9 @@ draw_channel_text: cmp [scroll2.all_redraw], 1 ;No jnz .noscroll mov edx, [textbox_height] - sub edx, [edi + window.text_line_print] - jg .noscroll + add edx, [edi + window.text_line_print] + cmp edx, [edi + window.text_lines] + jl .noscroll .yesscroll: ; Scrollbar was at lowest position, scroll down automatically when new text arrived. mov edx, [edi + window.text_lines] diff --git a/programs/network/ircc/window.inc b/programs/network/ircc/window.inc index 30a988a2c4..4225a51f05 100644 --- a/programs/network/ircc/window.inc +++ b/programs/network/ircc/window.inc @@ -35,8 +35,7 @@ window_create_textbox: pop eax mov [ebx + window.data_ptr], eax - mov [ebx + window.flags], 0 - or [ebx + window.flags], FLAG_SCROLL_LOW + mov [ebx + window.flags], 0x04 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