From 9c5d2fc3fc447114995d822ed7c00efd40d16c27 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Fri, 6 Sep 2013 17:06:53 +0000 Subject: [PATCH] Calendar 1.45: highlight current date git-svn-id: svn://kolibrios.org@3892 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/system/calendar/trunk/calendar.asm | 16 +++++++++------- programs/system/calendar/trunk/data.inc | 16 ++++++++-------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/programs/system/calendar/trunk/calendar.asm b/programs/system/calendar/trunk/calendar.asm index 0efa7d4749..df6979c6cb 100644 --- a/programs/system/calendar/trunk/calendar.asm +++ b/programs/system/calendar/trunk/calendar.asm @@ -1,6 +1,6 @@ ; Calendar for KolibriOS ; -; v1.2 - v1.4 - new desighn and functionality by Leency +; v1.2 - v1.45 - new desighn and functionality by Leency ; v1.1 - add change time support by DedOK ; v1.0 - written in pure assembler by Ivushkin Andrey aka Willow ; also - diamond, spraid, fedesco @@ -714,14 +714,13 @@ draw_days: cmp [focus],4 jne .not_active DrawRect COL_DATE_ACTIVE_1,COL_DATE_ACTIVE_2,COL_DATE_ACTIVE_3,COL_DATE_ACTIVE_4 - jmp .after_draw_but + jmp .out .not_active: DrawRect COL_DATE_INACTIVE_1,COL_DATE_INACTIVE_2,COL_DATE_INACTIVE_3,COL_DATE_INACTIVE_4 - jmp .after_draw_but + jmp .out .draw_but: ;draw non selected button add edx,200+1 shl 29 mcall 8 -.after_draw_but: mov eax,[Year] cmp [curYear],eax jne .out @@ -731,10 +730,13 @@ draw_days: mov eax,[number] cmp [curDay],eax jne .out - ;DrawRect COL_DATE_INACTIVE_1,COL_DATE_INACTIVE_2,COL_DATE_INACTIVE_3,COL_DATE_INACTIVE_4 + mov edx,0xff0000 + mov bx,DATE_BUTTON_WIDTH-2 + mov cx,2 + add ebx,1 shl 16 + add ecx,27 shl 16 + mcall 13 .out: - - mov eax, [number] xor edx, edx mov ecx, 10 diff --git a/programs/system/calendar/trunk/data.inc b/programs/system/calendar/trunk/data.inc index 0eb5f70300..08bd716205 100644 --- a/programs/system/calendar/trunk/data.inc +++ b/programs/system/calendar/trunk/data.inc @@ -19,14 +19,14 @@ COL_DROPDOWN_BG equ 0x666666 COL_DROPDOWN_T equ 0x10CCCccc COL_NEW_STYLE_T equ 0xef3333 -COL_DATE_INACTIVE_1 equ 0x1585B8 -COL_DATE_INACTIVE_2 equ 0x4EA4CA -COL_DATE_INACTIVE_3 equ 0x5FB2D6 -COL_DATE_INACTIVE_4 equ 0x81C1DE -COL_DATE_ACTIVE_1 equ 0xBB8C00 -COL_DATE_ACTIVE_2 equ 0xEAB10F -COL_DATE_ACTIVE_3 equ 0xF7C22D -COL_DATE_ACTIVE_4 equ 0xF7CB4B +COL_DATE_INACTIVE_1 equ 0x1379A8 +COL_DATE_INACTIVE_2 equ 0x53ACD1 +COL_DATE_INACTIVE_3 equ 0x7CC0DC +COL_DATE_INACTIVE_4 equ 0xABD7E8 +COL_DATE_ACTIVE_1 equ 0xB17A00 +COL_DATE_ACTIVE_2 equ 0xEDA700 +COL_DATE_ACTIVE_3 equ 0xFFCC00 +COL_DATE_ACTIVE_4 equ 0xFFE56B remainder dd 1 quotient dd 1