Calendar: text fix

git-svn-id: svn://kolibrios.org@5880 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
pathoswithin 2015-11-04 23:27:35 +00:00
parent 47a9023a5f
commit 4caeaae3c6
2 changed files with 54 additions and 71 deletions

View File

@ -471,7 +471,7 @@ draw_clock:
mcall 3
mov ecx,eax
mcall 47,0x00020100, ,195*65536+301,0x50CCCCCC,COL_TOOLBAR_BG
mcall 47,0x00020100, ,195*65536+298,0x50CCCCCC,COL_TOOLBAR_BG
shr ecx,8
add edx,22*65536
@ -513,38 +513,33 @@ panel_top:
mcall 13,0*65536+B_WBAR_X,84*65536+199,0xE7E7E7
draw_window:
call draw_clock
call draw_week
mcall 8,193*65536+8,287*65536+10,72,COL_TOOLBAR_BG
mcall 8,193*65536+8,285*65536+10,72,COL_TOOLBAR_BG
mov ebx,202*65536+8
inc edx ;73
mcall
mov ebx,193*65536+8
mov ecx,311*65536+10
mov ecx,315*65536+10
inc edx ;74
mcall
mov ebx,202*65536+8
inc edx ;75
mcall
mov ebx,215*65536+8
mov ecx,287*65536+10
mov ecx,285*65536+10
inc edx ;76
mcall
mov ebx,224*65536+8
inc edx ;77
mcall
mov ebx,215*65536+8
mov ecx,311*65536+10
mov ecx,315*65536+10
inc edx ;78
mcall
mov ebx,224*65536+8
inc edx ;79
mcall
;mov ebx,237*65536+21
;mov ecx,281*65536+35
;inc edx ;80
;or edx,0x40CCFF44
;mcall
mov ebx,25*65536+110
mov ecx,293*65536+22
mov esi,COL_TOOLBAR_BG
@ -568,7 +563,7 @@ draw_window:
mov ebx,B_SPIN_X ; <
inc edx
mcall
add ebx,61 shl 16 ; >
add ebx,54 shl 16 ; >
inc edx
mcall
call draw_days
@ -577,8 +572,8 @@ draw_window:
mcall 4,157*65536+301,0x80CCCCCC,sys_text
mcall ,211*65536+301,,separator
mcall ,233*65536+301
mcall ,185*65536+289, ,plus
mcall ,185*65536+313, ,minus
mcall ,185*65536+287, ,plus
mcall ,185*65536+317, ,minus
mcall , 35*65536+300,0x00CCCCCC,set_date_t,15 ;set date text
@ -603,7 +598,7 @@ draw_window:
mov ebx,B_SPIN
mov edx,spinner
mov esi,12
mov esi,8
mov ecx,COL_DROPDOWN_T
mcall
@ -616,12 +611,10 @@ draw_window:
mcall
call draw_year
call draw_clock
mov [dropped],0
ret
draw_year:
mcall 8,B_YEAR_X,B_Y,5,COL_MONTH_YEAR_B
ShowFocus 3,esi
mcall 47,0x40001,Year,B_YEAR
ret
@ -696,8 +689,8 @@ draw_days:
mov edx,B_DAYS_Y
mov ebx,0x10001
mov edi,[firstday]
.dayloop:
push ecx
.dayloop:
movzx edx,dx
mov esi,edi
shl esi,21
@ -714,12 +707,11 @@ draw_days:
mov ecx,number
inc dword[ecx]
pusha
sub edx,8 shl 16 + 8
mov ebx,edx
mov bx,DATE_BUTTON_WIDTH-1
sub ebx,8 shl 16
shrd ecx,edx,16
mov cx,DATE_BUTTON_HEIGHT-1
sub ecx,12 shl 16
mov edx,[number]
cmp edx,[day_sel]
je .draw_sel
@ -763,34 +755,27 @@ draw_days:
mov [quotient], eax
popa
;first number
; first number
mov ecx,quotient
mcall
add edx,1 shl 16
mcall
sub edx,1 shl 16
;second number
; second number
mov ecx,remainder
add edx,9 shl 16
add edx,8 shl 16
mcall
add edx,1 shl 16
mcall
sub edx,10 shl 16
pop ecx
inc edi
cmp edi,7
jne .nowrap
xor edi,edi
add dx,B_DAYS_SHIFT
.nowrap:
loop .eloop
jmp .ex
.eloop:
jmp .dayloop
.ex:
.nowrap:
dec dword [esp]
jnz .dayloop
pop ecx
ret
count_days: ; ecx -days in month

View File

@ -24,7 +24,7 @@ COL_WEEKDAY_BG equ 0xCCCDDD
COL_DATE_BUTTONS equ 0xF3F3F3
COL_TIME_BUTTONS equ 0x5555dd
COL_GO_TODAY_T equ 0xd048c8
COL_MONTH_YEAR_B equ 0x0555555 ; 0 for time?
COL_MONTH_YEAR_B equ 0x555555
COL_DROPDOWN_BG equ 0x666666
COL_DROPDOWN_T equ 0x10CCCccc
COL_NEW_STYLE_T equ 0xef3333
@ -49,25 +49,23 @@ DATE_BUTTON_HEIGHT equ 30
LINE1 equ 27 shl 16+16
B_MONTH_X equ 15 shl 16+158
B_Y equ LINE1
B_MONTH equ 63 shl 16+32
B_MONTH equ 63 shl 16+27
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+70
B_WEEK equ 34 shl 16+64
B_WX_SHIFT equ 32 shl 16
B_DROP equ B_MONTH+16
B_DAYS_Y equ 106
B_DAYS_SHIFT equ 30
B_YEAR_X equ 198 shl 16+46
B_YEAR equ 206 shl 16+32
B_YEAR equ 204 shl 16+28
B_SPIN_WIDTH equ 13
B_SPIN_X equ 184 shl 16+B_SPIN_WIDTH
B_SPIN equ 188 shl 16+32
B_SPIN_X equ 186 shl 16+12
B_SPIN equ 188 shl 16+28
spinner db '< >'
B_TODAY_X equ 25 shl 16