forked from KolibriOS/kolibrios
Calendar: text fix
git-svn-id: svn://kolibrios.org@5880 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
47a9023a5f
commit
4caeaae3c6
@ -471,7 +471,7 @@ draw_clock:
|
|||||||
|
|
||||||
mcall 3
|
mcall 3
|
||||||
mov ecx,eax
|
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
|
shr ecx,8
|
||||||
add edx,22*65536
|
add edx,22*65536
|
||||||
@ -513,38 +513,33 @@ panel_top:
|
|||||||
mcall 13,0*65536+B_WBAR_X,84*65536+199,0xE7E7E7
|
mcall 13,0*65536+B_WBAR_X,84*65536+199,0xE7E7E7
|
||||||
|
|
||||||
draw_window:
|
draw_window:
|
||||||
|
call draw_clock
|
||||||
call draw_week
|
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
|
mov ebx,202*65536+8
|
||||||
inc edx ;73
|
inc edx ;73
|
||||||
mcall
|
mcall
|
||||||
mov ebx,193*65536+8
|
mov ebx,193*65536+8
|
||||||
mov ecx,311*65536+10
|
mov ecx,315*65536+10
|
||||||
inc edx ;74
|
inc edx ;74
|
||||||
mcall
|
mcall
|
||||||
mov ebx,202*65536+8
|
mov ebx,202*65536+8
|
||||||
inc edx ;75
|
inc edx ;75
|
||||||
mcall
|
mcall
|
||||||
mov ebx,215*65536+8
|
mov ebx,215*65536+8
|
||||||
mov ecx,287*65536+10
|
mov ecx,285*65536+10
|
||||||
inc edx ;76
|
inc edx ;76
|
||||||
mcall
|
mcall
|
||||||
mov ebx,224*65536+8
|
mov ebx,224*65536+8
|
||||||
inc edx ;77
|
inc edx ;77
|
||||||
mcall
|
mcall
|
||||||
mov ebx,215*65536+8
|
mov ebx,215*65536+8
|
||||||
mov ecx,311*65536+10
|
mov ecx,315*65536+10
|
||||||
inc edx ;78
|
inc edx ;78
|
||||||
mcall
|
mcall
|
||||||
mov ebx,224*65536+8
|
mov ebx,224*65536+8
|
||||||
inc edx ;79
|
inc edx ;79
|
||||||
mcall
|
mcall
|
||||||
;mov ebx,237*65536+21
|
|
||||||
;mov ecx,281*65536+35
|
|
||||||
;inc edx ;80
|
|
||||||
;or edx,0x40CCFF44
|
|
||||||
;mcall
|
|
||||||
mov ebx,25*65536+110
|
mov ebx,25*65536+110
|
||||||
mov ecx,293*65536+22
|
mov ecx,293*65536+22
|
||||||
mov esi,COL_TOOLBAR_BG
|
mov esi,COL_TOOLBAR_BG
|
||||||
@ -568,7 +563,7 @@ draw_window:
|
|||||||
mov ebx,B_SPIN_X ; <
|
mov ebx,B_SPIN_X ; <
|
||||||
inc edx
|
inc edx
|
||||||
mcall
|
mcall
|
||||||
add ebx,61 shl 16 ; >
|
add ebx,54 shl 16 ; >
|
||||||
inc edx
|
inc edx
|
||||||
mcall
|
mcall
|
||||||
call draw_days
|
call draw_days
|
||||||
@ -577,8 +572,8 @@ draw_window:
|
|||||||
mcall 4,157*65536+301,0x80CCCCCC,sys_text
|
mcall 4,157*65536+301,0x80CCCCCC,sys_text
|
||||||
mcall ,211*65536+301,,separator
|
mcall ,211*65536+301,,separator
|
||||||
mcall ,233*65536+301
|
mcall ,233*65536+301
|
||||||
mcall ,185*65536+289, ,plus
|
mcall ,185*65536+287, ,plus
|
||||||
mcall ,185*65536+313, ,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
|
||||||
|
|
||||||
|
|
||||||
@ -603,7 +598,7 @@ draw_window:
|
|||||||
|
|
||||||
mov ebx,B_SPIN
|
mov ebx,B_SPIN
|
||||||
mov edx,spinner
|
mov edx,spinner
|
||||||
mov esi,12
|
mov esi,8
|
||||||
mov ecx,COL_DROPDOWN_T
|
mov ecx,COL_DROPDOWN_T
|
||||||
mcall
|
mcall
|
||||||
|
|
||||||
@ -616,12 +611,10 @@ draw_window:
|
|||||||
mcall
|
mcall
|
||||||
|
|
||||||
call draw_year
|
call draw_year
|
||||||
call draw_clock
|
|
||||||
mov [dropped],0
|
mov [dropped],0
|
||||||
ret
|
ret
|
||||||
|
|
||||||
draw_year:
|
draw_year:
|
||||||
mcall 8,B_YEAR_X,B_Y,5,COL_MONTH_YEAR_B
|
|
||||||
ShowFocus 3,esi
|
ShowFocus 3,esi
|
||||||
mcall 47,0x40001,Year,B_YEAR
|
mcall 47,0x40001,Year,B_YEAR
|
||||||
ret
|
ret
|
||||||
@ -696,8 +689,8 @@ draw_days:
|
|||||||
mov edx,B_DAYS_Y
|
mov edx,B_DAYS_Y
|
||||||
mov ebx,0x10001
|
mov ebx,0x10001
|
||||||
mov edi,[firstday]
|
mov edi,[firstday]
|
||||||
.dayloop:
|
|
||||||
push ecx
|
push ecx
|
||||||
|
.dayloop:
|
||||||
movzx edx,dx
|
movzx edx,dx
|
||||||
mov esi,edi
|
mov esi,edi
|
||||||
shl esi,21
|
shl esi,21
|
||||||
@ -714,12 +707,11 @@ draw_days:
|
|||||||
mov ecx,number
|
mov ecx,number
|
||||||
inc dword[ecx]
|
inc dword[ecx]
|
||||||
pusha
|
pusha
|
||||||
|
sub edx,8 shl 16 + 8
|
||||||
mov ebx,edx
|
mov ebx,edx
|
||||||
mov bx,DATE_BUTTON_WIDTH-1
|
mov bx,DATE_BUTTON_WIDTH-1
|
||||||
sub ebx,8 shl 16
|
|
||||||
shrd ecx,edx,16
|
shrd ecx,edx,16
|
||||||
mov cx,DATE_BUTTON_HEIGHT-1
|
mov cx,DATE_BUTTON_HEIGHT-1
|
||||||
sub ecx,12 shl 16
|
|
||||||
mov edx,[number]
|
mov edx,[number]
|
||||||
cmp edx,[day_sel]
|
cmp edx,[day_sel]
|
||||||
je .draw_sel
|
je .draw_sel
|
||||||
@ -768,29 +760,22 @@ draw_days:
|
|||||||
mcall
|
mcall
|
||||||
add edx,1 shl 16
|
add edx,1 shl 16
|
||||||
mcall
|
mcall
|
||||||
sub edx,1 shl 16
|
|
||||||
|
|
||||||
; second number
|
; second number
|
||||||
mov ecx,remainder
|
mov ecx,remainder
|
||||||
add edx,9 shl 16
|
add edx,8 shl 16
|
||||||
mcall
|
mcall
|
||||||
add edx,1 shl 16
|
add edx,1 shl 16
|
||||||
mcall
|
mcall
|
||||||
sub edx,10 shl 16
|
sub edx,10 shl 16
|
||||||
|
|
||||||
|
|
||||||
pop ecx
|
|
||||||
inc edi
|
inc edi
|
||||||
cmp edi,7
|
cmp edi,7
|
||||||
jne .nowrap
|
jne .nowrap
|
||||||
xor edi,edi
|
xor edi,edi
|
||||||
add dx,B_DAYS_SHIFT
|
add dx,B_DAYS_SHIFT
|
||||||
.nowrap:
|
.nowrap:
|
||||||
loop .eloop
|
dec dword [esp]
|
||||||
jmp .ex
|
jnz .dayloop
|
||||||
.eloop:
|
pop ecx
|
||||||
jmp .dayloop
|
|
||||||
.ex:
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
count_days: ; ecx -days in month
|
count_days: ; ecx -days in month
|
||||||
|
@ -24,7 +24,7 @@ COL_WEEKDAY_BG equ 0xCCCDDD
|
|||||||
COL_DATE_BUTTONS equ 0xF3F3F3
|
COL_DATE_BUTTONS equ 0xF3F3F3
|
||||||
COL_TIME_BUTTONS equ 0x5555dd
|
COL_TIME_BUTTONS equ 0x5555dd
|
||||||
COL_GO_TODAY_T equ 0xd048c8
|
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_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
|
||||||
@ -49,25 +49,23 @@ DATE_BUTTON_HEIGHT equ 30
|
|||||||
LINE1 equ 27 shl 16+16
|
LINE1 equ 27 shl 16+16
|
||||||
B_MONTH_X equ 15 shl 16+158
|
B_MONTH_X equ 15 shl 16+158
|
||||||
B_Y equ LINE1
|
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
|
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+70
|
B_WEEK equ 34 shl 16+64
|
||||||
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
|
||||||
B_DAYS_Y equ 106
|
B_DAYS_Y equ 106
|
||||||
B_DAYS_SHIFT equ 30
|
B_DAYS_SHIFT equ 30
|
||||||
|
|
||||||
B_YEAR_X equ 198 shl 16+46
|
B_YEAR equ 204 shl 16+28
|
||||||
B_YEAR equ 206 shl 16+32
|
|
||||||
|
|
||||||
B_SPIN_WIDTH equ 13
|
B_SPIN_X equ 186 shl 16+12
|
||||||
B_SPIN_X equ 184 shl 16+B_SPIN_WIDTH
|
B_SPIN equ 188 shl 16+28
|
||||||
B_SPIN equ 188 shl 16+32
|
|
||||||
spinner db '< >'
|
spinner db '< >'
|
||||||
|
|
||||||
B_TODAY_X equ 25 shl 16
|
B_TODAY_X equ 25 shl 16
|
||||||
|
Loading…
Reference in New Issue
Block a user