ircc: colors live update

git-svn-id: svn://kolibrios.org@7890 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2020-05-07 20:03:43 +00:00
parent b38cab6054
commit f53424d741
2 changed files with 35 additions and 32 deletions

View File

@ -1,6 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;; ;; ;;
;; Copyright (C) KolibriOS team 2004-2018. All rights reserved. ;; ;; Copyright (C) KolibriOS team 2004-2020. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;; ;; Distributed under terms of the GNU General Public License ;;
;; ;; ;; ;;
;; Written by hidnplayr@kolibrios.org ;; ;; Written by hidnplayr@kolibrios.org ;;
@ -15,6 +15,10 @@ draw_window: ; Completely redraw the window, recalculate all coordinates and
pusha pusha
; get system colors
mcall 48, 3, colors, 40
call set_edit_box_and_scrollbar_colors
mcall 9, thread_info, -1 ; get information about this thread mcall 9, thread_info, -1 ; get information about this thread
mov eax, [thread_info.box.width] ; window xsize mov eax, [thread_info.box.width] ; window xsize
mov ebx, [thread_info.box.height] ; ysize mov ebx, [thread_info.box.height] ; ysize
@ -277,7 +281,7 @@ draw_window_tabs:
jne @f jne @f
;not esi ;not esi
;and esi, 0x00ffffff ;and esi, 0x00ffffff
mov esi, [colors.work_light] mov esi, [colors.work_light]
@@: @@:
mcall mcall
inc edx inc edx
@ -299,18 +303,18 @@ draw_window_tabs:
mov ecx, TOP_SPACE shl 16 + TAB_HEIGHT - 1 mov ecx, TOP_SPACE shl 16 + TAB_HEIGHT - 1
mov edx, WINDOW_BTN_CLOSE mov edx, WINDOW_BTN_CLOSE
mov esi, 0x00aa0000 ; red ! mov esi, 0x00aa0000 ; red !
mcall mcall
pusha pusha
; write closing cross ; write closing cross
mov ebx, [xsize] mov ebx, [xsize]
sub ebx, 9 sub ebx, 9
shl ebx, 16 shl ebx, 16
add ebx, TOP_SPACE+3 add ebx, TOP_SPACE+3
mov ecx, 0x80FFFfff mov ecx, 0x80FFFfff
mov edx, closing_cross mov edx, closing_cross
mcall 4 mcall 4
popa popa
@@: @@:
; Draw the windownames onto the buttons ; Draw the windownames onto the buttons
@ -360,4 +364,22 @@ highlight_updated_tabs:
jnz .more_ jnz .more_
.enough_: .enough_:
ret
set_edit_box_and_scrollbar_colors:
mov eax, [colors.work]
mov [scroll1.bg_color], eax
mov [scroll2.bg_color], eax
mov eax, [colors.work_button]
mov [scroll1.front_color], eax
mov [scroll2.front_color], eax
mov eax, [colors.work_text]
mov [scroll1.line_color], eax
mov [scroll2.line_color], eax
mov [scroll1.type], 0 ; 0 = simple, 1 = skinned
mov [scroll2.type], 0
ret ret

View File

@ -1,6 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;; ;; ;;
;; Copyright (C) KolibriOS team 2004-2018. All rights reserved. ;; ;; Copyright (C) KolibriOS team 2004-2020. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;; ;; Distributed under terms of the GNU General Public License ;;
;; ;; ;; ;;
;; IRC client for KolibriOS ;; ;; IRC client for KolibriOS ;;
@ -13,7 +13,7 @@
;; ;; ;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
version equ '0.31' version equ '0.32'
; connection status ; connection status
STATUS_DISCONNECTED = 0 STATUS_DISCONNECTED = 0
@ -186,25 +186,6 @@ START:
jz exit jz exit
mov [ebx + window.type], WINDOWTYPE_SERVER mov [ebx + window.type], WINDOWTYPE_SERVER
; get system colors
mcall 48, 3, colors, 40
; set edit box and scrollbar colors
mov eax, [colors.work]
mov [scroll1.bg_color], eax
mov [scroll2.bg_color], eax
mov eax, [colors.work_button]
mov [scroll1.front_color], eax
mov [scroll2.front_color], eax
mov eax, [colors.work_text]
mov [scroll1.line_color], eax
mov [scroll2.line_color], eax
mov [scroll1.type], 1 ; 0 = simple, 1 = skinned
mov [scroll2.type], 1
; get settings from ini ; get settings from ini
invoke ini.get_str, path, str_user, str_nick, user_nick, MAX_NICK_LEN, default_nick invoke ini.get_str, path, str_user, str_nick, user_nick, MAX_NICK_LEN, default_nick
invoke ini.get_str, path, str_user, str_real, user_real_name, MAX_REAL_LEN, default_real invoke ini.get_str, path, str_user, str_real, user_real_name, MAX_REAL_LEN, default_real