From 337c9c65c29a41dd17a0d8ce531d87da8d42cabe Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Wed, 2 Apr 2014 22:26:56 +0000 Subject: [PATCH] Calendar: small redraw optimization git-svn-id: svn://kolibrios.org@4735 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/system/calendar/trunk/calendar.asm | 9 ++++++--- programs/system/calendar/trunk/data.inc | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/programs/system/calendar/trunk/calendar.asm b/programs/system/calendar/trunk/calendar.asm index afc1d536bf..4560081135 100644 --- a/programs/system/calendar/trunk/calendar.asm +++ b/programs/system/calendar/trunk/calendar.asm @@ -152,7 +152,7 @@ START: jmp upd red: - call draw_window + call define_window still: @@ -482,7 +482,7 @@ draw_clock: mcall ret -draw_window: +define_window: mcall 12,1 mcall 48,5 ;get screen size @@ -495,12 +495,16 @@ draw_window: shl ebx, 16 add ebx, WIN_W mcall 0,,,COL_WINDOW_BG, ,title ; define window + mcall 12,2 GetSkinHeight mov ecx, eax shl ecx, 16 add ecx, 43 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,0*65536+B_WBAR_X,84*65536+199,0xE7E7E7 + +draw_window: call draw_week mcall 8,193*65536+8,287*65536+10,72,COL_TOOLBAR_BG @@ -606,7 +610,6 @@ draw_window: call draw_year call draw_clock mov [dropped],0 - mcall 12,2 ret draw_year: diff --git a/programs/system/calendar/trunk/data.inc b/programs/system/calendar/trunk/data.inc index 5f3e19375e..deaa7d7b0a 100644 --- a/programs/system/calendar/trunk/data.inc +++ b/programs/system/calendar/trunk/data.inc @@ -17,7 +17,7 @@ leap_year dd ? number dd ? ; colors -COL_WINDOW_BG equ 0x14E7E7E7 +COL_WINDOW_BG equ 0x54E7E7E7 COL_TOOLBAR_BG equ 0x555555 COL_ACTIVE_TEXT equ 0x10e7c750 COL_WEEKDAY_BG equ 0xCCCDDD