calendar: remove "new style" button, gui fixes

git-svn-id: svn://kolibrios.org@6950 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2017-09-05 21:11:15 +00:00
parent fe0dae0c76
commit c859c68cc7
2 changed files with 35 additions and 47 deletions

View File

@ -93,12 +93,19 @@ macro DrawRect color1,color2,color3,color4 ; pizdec... but optimized well
mov bx,1 mov bx,1
mov cx,DATE_BUTTON_HEIGHT-3 mov cx,DATE_BUTTON_HEIGHT-3
mcall mcall
; rgiht border-outer ; right border-outer
mov edx,color2 mov edx,color2
add ebx,1 shl 16 add ebx,1 shl 16
sub ecx,1 shl 16 sub ecx,1 shl 16
add cx,1 add cx,1
mcall 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 ; bottom border-outer
mov edx,color2 mov edx,color2
pop ecx pop ecx
@ -108,6 +115,12 @@ macro DrawRect color1,color2,color3,color4 ; pizdec... but optimized well
add ebx,1 shl 16 add ebx,1 shl 16
mov cx,1 mov cx,1
mcall 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 ; left border-outer
mov edx,color4 mov edx,color4
add ebx,1 shl 16 add ebx,1 shl 16
@ -563,7 +576,7 @@ draw_window:
mov ebx,B_SPIN_X ; < mov ebx,B_SPIN_X ; <
inc edx inc edx
mcall mcall
add ebx,54 shl 16 ; > add ebx,55 shl 16 ; >
inc edx inc edx
mcall mcall
call draw_days call draw_days
@ -576,20 +589,6 @@ draw_window:
mcall ,185*65536+317, ,minus mcall ,185*65536+317, ,minus
mcall , 35*65536+300,0x00CCCCCC,set_date_t,15 ;set date text 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 ecx,COL_GO_TODAY_T
mov edx,today_msg mov edx,today_msg
mov ebx,B_TODAY mov ebx,B_TODAY
@ -634,7 +633,7 @@ draw_dropdown:
push ecx push ecx
mov esi,COL_DROPDOWN_BG mov esi,COL_DROPDOWN_BG
mcall 8,B_MONTH_X,[esp+4] mcall 8,B_MONTH_X,[esp+4]
shr eax,1 mov eax,4
mov ebx,[esp+8] mov ebx,[esp+8]
xchg edx,[esp+12] xchg edx,[esp+12]
movzx esi,byte[month_name] movzx esi,byte[month_name]
@ -731,6 +730,7 @@ draw_days:
.draw_but: ;draw non selected button .draw_but: ;draw non selected button
add edx,200+1 shl 29 add edx,200+1 shl 29
mcall 8 mcall 8
DrawRect COL_DATE_1,COL_DATE_2,COL_DATE_3,COL_DATE_4
mov eax,[Year] mov eax,[Year]
cmp [curYear],eax cmp [curYear],eax
jne .out jne .out
@ -741,10 +741,10 @@ draw_days:
cmp [curDay],eax cmp [curDay],eax
jne .out jne .out
mov edx,0xff0000 mov edx,0xff0000
mov bx,DATE_BUTTON_WIDTH-2 mov bx,DATE_BUTTON_WIDTH-1
mov cx,2 mov cx,3
add ebx,1 shl 16 sub ebx,2 shl 16
add ecx,27 shl 16 sub ecx,1 shl 16
mcall 13 mcall 13
.out: .out:
mov eax, [number] mov eax, [number]
@ -831,8 +831,6 @@ calculate:
shr ecx,2 shr ecx,2
add eax,ecx add eax,ecx
dec eax dec eax
cmp [new_style],0
je .nonew
add eax,2 add eax,2
xchg eax,ebx xchg eax,ebx
mov ecx,100 mov ecx,100
@ -841,7 +839,6 @@ calculate:
sub ebx,eax sub ebx,eax
shr eax,2 shr eax,2
add ebx,eax add ebx,eax
.nonew:
add ebx,5 add ebx,5
mov eax,ebx mov eax,ebx
xor edx,edx xor edx,edx

View File

@ -29,14 +29,20 @@ COL_DROPDOWN_BG equ 0x666666
COL_DROPDOWN_T equ 0x10CCCccc COL_DROPDOWN_T equ 0x10CCCccc
COL_NEW_STYLE_T equ 0xef3333 COL_NEW_STYLE_T equ 0xef3333
COL_DATE_INACTIVE_1 equ 0x1379A8 COL_DATE_INACTIVE_1 equ 0x388CAF
COL_DATE_INACTIVE_2 equ 0x53ACD1 COL_DATE_INACTIVE_2 equ 0x75B9D5
COL_DATE_INACTIVE_3 equ 0x7CC0DC COL_DATE_INACTIVE_3 equ 0x9ECBDF
COL_DATE_INACTIVE_4 equ 0xABD7E8 COL_DATE_INACTIVE_4 equ 0xABD7E8
COL_DATE_ACTIVE_1 equ 0xB17A00
COL_DATE_ACTIVE_2 equ 0xEDA700 COL_DATE_ACTIVE_1 equ 0xA57F2C
COL_DATE_ACTIVE_3 equ 0xFFCC00 COL_DATE_ACTIVE_2 equ 0xEFB52D
COL_DATE_ACTIVE_4 equ 0xFFE56B 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 ; definitions
WIN_W equ 275 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_X equ 1 shl 16+WIN_W-1
B_WBAR_Y equ 64 shl 16+20 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_WX_SHIFT equ 32 shl 16
B_DROP equ B_MONTH+16 B_DROP equ B_MONTH+16
@ -270,21 +276,6 @@ else
db 'Calendar',0 db 'Calendar',0
end if end if
n_style:
if lang eq ru
db '<27>®¢ë© á⨫ì'
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: today_msg:
if lang eq ru if lang eq ru
db '‘¥£®¤­ï' db '‘¥£®¤­ï'