From c859c68cc7f525456a56efa582d47dce70e38447 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Tue, 5 Sep 2017 21:11:15 +0000 Subject: [PATCH] calendar: remove "new style" button, gui fixes git-svn-id: svn://kolibrios.org@6950 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/system/calendar/trunk/calendar.asm | 45 ++++++++++----------- programs/system/calendar/trunk/data.inc | 37 +++++++---------- 2 files changed, 35 insertions(+), 47 deletions(-) diff --git a/programs/system/calendar/trunk/calendar.asm b/programs/system/calendar/trunk/calendar.asm index 1d980faa13..26d2bb3ae7 100644 --- a/programs/system/calendar/trunk/calendar.asm +++ b/programs/system/calendar/trunk/calendar.asm @@ -93,12 +93,19 @@ macro DrawRect color1,color2,color3,color4 ; pizdec... but optimized well mov bx,1 mov cx,DATE_BUTTON_HEIGHT-3 mcall - ; rgiht border-outer + ; right border-outer mov edx,color2 add ebx,1 shl 16 sub ecx,1 shl 16 add cx,1 mcall + ; right border-outer 2 + mov edx,color1 + add ebx,1 shl 16 + sub ecx,1 shl 16 + add cx,2 + add cx,1 + mcall ; bottom border-outer mov edx,color2 pop ecx @@ -108,6 +115,12 @@ macro DrawRect color1,color2,color3,color4 ; pizdec... but optimized well add ebx,1 shl 16 mov cx,1 mcall + ; bottom border-outer 2 + mov edx,color1 + add ecx,1 shl 16 + mcall + add ebx,1 shl 16 + sub ecx,1 shl 16 ; left border-outer mov edx,color4 add ebx,1 shl 16 @@ -563,7 +576,7 @@ draw_window: mov ebx,B_SPIN_X ; < inc edx mcall - add ebx,54 shl 16 ; > + add ebx,55 shl 16 ; > inc edx mcall call draw_days @@ -576,20 +589,6 @@ draw_window: mcall ,185*65536+317, ,minus mcall , 35*65536+300,0x00CCCCCC,set_date_t,15 ;set date text - - mov ecx,0x10ddeeff - mov edx,n_style - mov esi,ns_end-n_style - mov ebx,B_NS - cmp [new_style],1 - je .high - mov ecx,0xa0a0a0 - jmp .int - .high: - mov ecx,COL_NEW_STYLE_T - .int: - mcall - mov ecx,COL_GO_TODAY_T mov edx,today_msg mov ebx,B_TODAY @@ -634,7 +633,7 @@ draw_dropdown: push ecx mov esi,COL_DROPDOWN_BG mcall 8,B_MONTH_X,[esp+4] - shr eax,1 + mov eax,4 mov ebx,[esp+8] xchg edx,[esp+12] movzx esi,byte[month_name] @@ -731,6 +730,7 @@ draw_days: .draw_but: ;draw non selected button add edx,200+1 shl 29 mcall 8 + DrawRect COL_DATE_1,COL_DATE_2,COL_DATE_3,COL_DATE_4 mov eax,[Year] cmp [curYear],eax jne .out @@ -741,10 +741,10 @@ draw_days: cmp [curDay],eax jne .out mov edx,0xff0000 - mov bx,DATE_BUTTON_WIDTH-2 - mov cx,2 - add ebx,1 shl 16 - add ecx,27 shl 16 + mov bx,DATE_BUTTON_WIDTH-1 + mov cx,3 + sub ebx,2 shl 16 + sub ecx,1 shl 16 mcall 13 .out: mov eax, [number] @@ -831,8 +831,6 @@ calculate: shr ecx,2 add eax,ecx dec eax - cmp [new_style],0 - je .nonew add eax,2 xchg eax,ebx mov ecx,100 @@ -841,7 +839,6 @@ calculate: sub ebx,eax shr eax,2 add ebx,eax - .nonew: add ebx,5 mov eax,ebx xor edx,edx diff --git a/programs/system/calendar/trunk/data.inc b/programs/system/calendar/trunk/data.inc index 43c5324f71..9990b1485b 100644 --- a/programs/system/calendar/trunk/data.inc +++ b/programs/system/calendar/trunk/data.inc @@ -29,14 +29,20 @@ COL_DROPDOWN_BG equ 0x666666 COL_DROPDOWN_T equ 0x10CCCccc COL_NEW_STYLE_T equ 0xef3333 -COL_DATE_INACTIVE_1 equ 0x1379A8 -COL_DATE_INACTIVE_2 equ 0x53ACD1 -COL_DATE_INACTIVE_3 equ 0x7CC0DC +COL_DATE_INACTIVE_1 equ 0x388CAF +COL_DATE_INACTIVE_2 equ 0x75B9D5 +COL_DATE_INACTIVE_3 equ 0x9ECBDF 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 + +COL_DATE_ACTIVE_1 equ 0xA57F2C +COL_DATE_ACTIVE_2 equ 0xEFB52D +COL_DATE_ACTIVE_3 equ 0xFAD84C +COL_DATE_ACTIVE_4 equ 0xFAE995 + +COL_DATE_1 equ 0x8C8C8C +COL_DATE_2 equ 0xFFFfff +COL_DATE_3 equ 0xF2F2F2 +COL_DATE_4 equ 0xF2F2F2 ; definitions WIN_W equ 275 @@ -55,7 +61,7 @@ BT_WBAR_Y equ 283 shl 16+43 B_WBAR_X equ 1 shl 16+WIN_W-1 B_WBAR_Y equ 64 shl 16+20 -B_WEEK equ 34 shl 16+64 +B_WEEK equ 34 shl 16+66 B_WX_SHIFT equ 32 shl 16 B_DROP equ B_MONTH+16 @@ -270,21 +276,6 @@ else db 'Calendar',0 end if -n_style: -if lang eq ru - db 'Новый стиль' -else if lang eq de - db 'Neuer Stil' -else if lang eq fr - db 'Nouveau' -else if lang eq et - db 'Uus stiil' -else if lang eq it - db 'Nuovo stile' -else - db 'New style' -end if -ns_end: today_msg: if lang eq ru db 'Сегодня'