Calendar: small redraw optimization

git-svn-id: svn://kolibrios.org@4735 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2014-04-02 22:26:56 +00:00
parent 76718d400a
commit 337c9c65c2
2 changed files with 7 additions and 4 deletions

View File

@ -152,7 +152,7 @@ START:
jmp upd jmp upd
red: red:
call draw_window call define_window
still: still:
@ -482,7 +482,7 @@ draw_clock:
mcall mcall
ret ret
draw_window: define_window:
mcall 12,1 mcall 12,1
mcall 48,5 ;get screen size mcall 48,5 ;get screen size
@ -495,12 +495,16 @@ draw_window:
shl ebx, 16 shl ebx, 16
add ebx, WIN_W add ebx, WIN_W
mcall 0,,,COL_WINDOW_BG, ,title ; define window mcall 0,,,COL_WINDOW_BG, ,title ; define window
mcall 12,2
GetSkinHeight GetSkinHeight
mov ecx, eax mov ecx, eax
shl ecx, 16 shl ecx, 16
add ecx, 43 add ecx, 43
mcall 13,B_WBAR_X, ,COL_TOOLBAR_BG ; draw toolbar background mcall 13,B_WBAR_X, ,COL_TOOLBAR_BG ; draw toolbar background
mcall 13,B_WBAR_X,BT_WBAR_Y,COL_TOOLBAR_BG ; draw toolbar background mcall 13,B_WBAR_X,BT_WBAR_Y,COL_TOOLBAR_BG ; draw toolbar background
mcall 13,0*65536+B_WBAR_X,84*65536+199,0xE7E7E7
draw_window:
call draw_week call draw_week
mcall 8,193*65536+8,287*65536+10,72,COL_TOOLBAR_BG mcall 8,193*65536+8,287*65536+10,72,COL_TOOLBAR_BG
@ -606,7 +610,6 @@ draw_window:
call draw_year call draw_year
call draw_clock call draw_clock
mov [dropped],0 mov [dropped],0
mcall 12,2
ret ret
draw_year: draw_year:

View File

@ -17,7 +17,7 @@ leap_year dd ?
number dd ? number dd ?
; colors ; colors
COL_WINDOW_BG equ 0x14E7E7E7 COL_WINDOW_BG equ 0x54E7E7E7
COL_TOOLBAR_BG equ 0x555555 COL_TOOLBAR_BG equ 0x555555
COL_ACTIVE_TEXT equ 0x10e7c750 COL_ACTIVE_TEXT equ 0x10e7c750
COL_WEEKDAY_BG equ 0xCCCDDD COL_WEEKDAY_BG equ 0xCCCDDD