mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-25 16:16:50 +03:00
@icon: use bigger fonts and optimize redraw in Dialog "Add/Change icon"
git-svn-id: svn://kolibrios.org@7012 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
410ae12073
commit
d11225a260
@ -10,9 +10,9 @@ MIN_NO_MOVING equ 8 ;
|
||||
|
||||
;--------¤«ï ¤¨ «®£ ᮧ¤ ¨ï/। ªâ¨à®¢ ¨ï
|
||||
ICONSX equ 20
|
||||
ICONSY equ 80
|
||||
ICONS_DRAW_COUNTW equ 10 ;ª®«¨ç¥á⢮ ¨ª®®ª ¢ è¨à¨ã
|
||||
ICONS_DRAW_COUNTH equ 4 ;ª®«¨ç¥á⢮ ¨ª®®ª ¢ ¢ëá®âã
|
||||
ICONSY equ 90
|
||||
ICONS_DRAW_COUNTW equ 12 ;ª®«¨ç¥á⢮ ¨ª®®ª ¢ è¨à¨ã
|
||||
ICONS_DRAW_COUNTH equ 6 ;ª®«¨ç¥á⢮ ¨ª®®ª ¢ ¢ëá®âã
|
||||
SPCW equ 3 ;¯à®¡¥« ¬¥¦¤ã ¨ª®ª ¬¨ ¯® £®à¨§®â «¨
|
||||
SPCH equ 3
|
||||
END_ICONS_AREAW equ ICONSX+(IMG_SIZE+SPCW)*ICONS_DRAW_COUNTW-SPCW
|
||||
@ -1144,10 +1144,9 @@ if lang eq ru
|
||||
DTitleAdd db '„®¡ ¢¨âì ¨ª®ªã',0
|
||||
DTitleProp db 'ˆ§¬¥¨âì ¨ª®ªã',0
|
||||
|
||||
DCaptName db 'ˆ¬ï',0
|
||||
DCaptPath db '<27>ãâì',0
|
||||
DCaptParams db '<27> à ¬¥âàë',0
|
||||
DCaptIcon db 'ˆª®ª ',0
|
||||
DCaptName db ' ˆ¬ï',0
|
||||
DCaptPath db ' <20>ãâì',0
|
||||
DCaptParams db ' Š«îç¨',0
|
||||
;DCaptChange db '.',0
|
||||
DCaptCreate db '‘®§¤ âì',0
|
||||
DCaptProperties db 'ˆ§¬¥¨âì',0
|
||||
@ -1157,23 +1156,23 @@ else
|
||||
DTitleAdd db 'Add icon',0
|
||||
DTitleProp db 'Change icon',0
|
||||
|
||||
DCaptName db 'Name',0
|
||||
DCaptPath db 'Path',0
|
||||
DCaptParams db 'Parameters',0
|
||||
DCaptIcon db 'Icon',0
|
||||
DCaptName db ' Name',0
|
||||
DCaptPath db ' Path',0
|
||||
DCaptParams db ' Params',0
|
||||
DCaptCreate db 'Create',0
|
||||
DCaptProperties db 'Change',0
|
||||
DCaptCancel db 'Cancel',0
|
||||
end if
|
||||
DCaptDots db '...',0
|
||||
|
||||
;/¥ ¬¥ïâì ¯®«®¦¥¨¥
|
||||
edtName edit_box NAME_LENGTH*6+4,70+20+IMG_SIZE,6,0FFFFFFh,06F9480h,0FFh,0h,0,NAME_LENGTH,\
|
||||
edtName edit_box NAME_LENGTH*8+4,120+IMG_SIZE,6,0FFFFFFh,06F9480h,0FFh,0h,0x90000000,NAME_LENGTH,\
|
||||
DAreaName,mouse_dd,0,0,0
|
||||
edtExePath edit_box 281-3-20-IMG_SIZE,70+20+IMG_SIZE,26,0FFFFFFh,06F9480h,0FFh,0h,0,255,\
|
||||
DAreaPath,mouse_dd,0,0,0
|
||||
edtParams edit_box 295-20-IMG_SIZE,70+20+IMG_SIZE,46,0FFFFFFh,06F9480h,0FFh,0h,0,255,\
|
||||
DAreaParams,mouse_dd,0,0,0
|
||||
edtIcon edit_box 28,24,50,0FFFFFFh,0FFFFFFh,0FFh,0h,0,3,\
|
||||
edtExePath edit_box END_ICONS_AREAW-120-IMG_SIZE-40,120+IMG_SIZE,30,0FFFFFFh,06F9480h,\
|
||||
0FFh,0h,0x90000000,255, DAreaPath,mouse_dd,0,0,0
|
||||
edtParams edit_box END_ICONS_AREAW-120-IMG_SIZE, 120+IMG_SIZE,54,0FFFFFFh,06F9480h,\
|
||||
0FFh,0h,0x90000000,255, DAreaParams,mouse_dd,0,0,0
|
||||
edtIcon edit_box 28,24,62,0FFFFFFh,0FFFFFFh,0FFh,0h,0x90000000,3,\
|
||||
DAreaIcon,0,0,0,0
|
||||
endEdits:
|
||||
;\
|
||||
|
@ -92,9 +92,10 @@ DlgProp:
|
||||
|
||||
mov ecx,256
|
||||
mov edi,DAreaIcon
|
||||
rep stosb
|
||||
mov dword[edtIcon.size],0
|
||||
mov dword[edtIcon.pos],0
|
||||
|
||||
mov [DAreaIcon],'0'
|
||||
mov dword[edtIcon.size],1
|
||||
mov dword[edtIcon.pos],1
|
||||
|
||||
jmp startDlg
|
||||
;--------
|
||||
@ -370,10 +371,8 @@ DMouse:
|
||||
|
||||
; stdcall [edit_box_draw],edtIcon
|
||||
|
||||
; need to optimize redraw
|
||||
; call DrawSelIcon
|
||||
; jmp DMessages
|
||||
jmp DReDraw
|
||||
call DrawSelIcon
|
||||
jmp DMessages
|
||||
;-------------------------------------------------------------------------------
|
||||
DSetExePath:
|
||||
stdcall [OpenDialog_Start],OpenDialog_data
|
||||
@ -455,79 +454,71 @@ proc DRedrawWin
|
||||
@@:
|
||||
mov edi,DTitleProp
|
||||
.l1:
|
||||
mcall 0,<100,400>,<100,(IMG_SIZE+SPCH)*ICONS_DRAW_COUNTH+165>,,,
|
||||
mcall 0,<100,END_ICONS_AREAW+ICONSX+10>,<100,(IMG_SIZE+SPCH)*ICONS_DRAW_COUNTH+178>,,,
|
||||
|
||||
stdcall [edit_box_draw],edtName
|
||||
stdcall [edit_box_draw],edtExePath
|
||||
stdcall [edit_box_draw],edtParams
|
||||
stdcall [edit_box_draw],edtIcon
|
||||
|
||||
call DrawStdIcons
|
||||
|
||||
|
||||
stdcall [scrollbar_h_draw],sbIcons
|
||||
mcall 38,<ICONSX+1,END_ICONS_AREAW-2>,\
|
||||
<END_ICONS_AREAH+3,END_ICONS_AREAH+3>,\
|
||||
[sc.work_graph]
|
||||
mcall ,<ICONSX+1,END_ICONS_AREAW-2>,\
|
||||
<END_ICONS_AREAH+3+15,END_ICONS_AREAH+3+15>,\
|
||||
[sc.work_graph]
|
||||
mcall 38,<ICONSX+1,END_ICONS_AREAW-2>,<END_ICONS_AREAH+3,END_ICONS_AREAH+3>,[sc.work_graph]
|
||||
mcall ,<ICONSX+1,END_ICONS_AREAW-2>,<END_ICONS_AREAH+3+15,END_ICONS_AREAH+3+15>,[sc.work_graph]
|
||||
|
||||
mcall ,<ICONSX,ICONSX>,\
|
||||
<END_ICONS_AREAH+3+1,END_ICONS_AREAH+3+15-1>,\
|
||||
[sc.work_graph]
|
||||
mcall ,<END_ICONS_AREAW-1,END_ICONS_AREAW-1>,\
|
||||
<END_ICONS_AREAH+3+1,END_ICONS_AREAH+3+15-1>,\
|
||||
[sc.work_graph]
|
||||
mcall ,<ICONSX,ICONSX>,<END_ICONS_AREAH+3+1,END_ICONS_AREAH+3+15-1>,[sc.work_graph]
|
||||
mcall ,<END_ICONS_AREAW-1,END_ICONS_AREAW-1>,<END_ICONS_AREAH+3+1,END_ICONS_AREAH+3+15-1>, [sc.work_graph]
|
||||
|
||||
;BUTTONS
|
||||
mcall 8,<250,49>,<30+END_ICONS_AREAH,16>,idbCreate,[sc.work_button]
|
||||
mcall ,<305,54>, ,idbCancel
|
||||
mcall ,<351,14>,<26,14> ,idbChange
|
||||
;BUTTONS
|
||||
mcall 8,<265,75>,<30+END_ICONS_AREAH,24>,idbCreate,[sc.work_button]
|
||||
mcall ,<360,77>, ,idbCancel
|
||||
mcall ,<END_ICONS_AREAW-30,30>,<30,20> ,idbChange
|
||||
|
||||
;CAPTIONS
|
||||
;CAPTIONS
|
||||
mov ecx,[sc.work_text]
|
||||
or ecx,80000000h
|
||||
or ecx,90000000h
|
||||
mcall 4,<30+IMG_SIZE,10>,,DCaptName
|
||||
mcall ,<30+IMG_SIZE,30>,,DCaptPath
|
||||
mcall ,<30+IMG_SIZE,50>,,DCaptParams
|
||||
;mcall ,<30+IMG_SIZE,70>,,DCaptIcon
|
||||
mcall ,<30+IMG_SIZE,35>,,DCaptPath
|
||||
mcall ,<30+IMG_SIZE,59>,,DCaptParams
|
||||
|
||||
if lang eq ru
|
||||
mov ecx,[sc.work_button_text]
|
||||
or ecx,80000000h
|
||||
mcall ,<309,35+END_ICONS_AREAH>,,DCaptCancel
|
||||
or ecx,90000000h
|
||||
mcall ,<369,35+END_ICONS_AREAH>,,DCaptCancel
|
||||
|
||||
cmp [DlgSelIcon],-1
|
||||
jne @f
|
||||
mpack ebx,255,35+END_ICONS_AREAH
|
||||
mpack ebx,275,35+END_ICONS_AREAH
|
||||
mov edx,DCaptCreate
|
||||
jmp .DRD1
|
||||
@@:
|
||||
mpack ebx,252,35+END_ICONS_AREAH
|
||||
mpack ebx,272,35+END_ICONS_AREAH
|
||||
mov edx,DCaptProperties
|
||||
.DRD1:
|
||||
else
|
||||
mov ecx,[sc.work_button_text]
|
||||
or ecx,80000000h
|
||||
mcall ,<315,35+END_ICONS_AREAH>,,DCaptCancel
|
||||
or ecx,90000000h
|
||||
mcall ,<372,35+END_ICONS_AREAH>,,DCaptCancel
|
||||
|
||||
|
||||
cmp [DlgSelIcon],-1
|
||||
jne @f
|
||||
mpack ebx,257,35+END_ICONS_AREAH
|
||||
mpack ebx,277,35+END_ICONS_AREAH
|
||||
mov edx,DCaptCreate
|
||||
jmp .DRD1
|
||||
@@:
|
||||
mpack ebx,257,35+END_ICONS_AREAH
|
||||
mpack ebx,277,35+END_ICONS_AREAH
|
||||
mov edx,DCaptProperties
|
||||
.DRD1:
|
||||
end if
|
||||
mcall
|
||||
|
||||
mcall 1,351+4 ,26+10,[sc.work_button_text]
|
||||
mcall ,351+4+3,26+10,
|
||||
mcall ,351+4+6,26+10,
|
||||
pusha
|
||||
mov ecx,[sc.work_button_text]
|
||||
or ecx,90000000h
|
||||
mcall 4,<END_ICONS_AREAW-30+4,33>,,DCaptDots
|
||||
popa
|
||||
|
||||
call DrawSelIcon
|
||||
|
||||
@ -656,6 +647,15 @@ local IcoX:DWORD,\
|
||||
endp
|
||||
|
||||
proc DrawSelIcon
|
||||
|
||||
|
||||
mov edx,[sc.work]
|
||||
mcall 13,<ICONSX+18,3*8>,<59,12>
|
||||
|
||||
mov ecx,[sc.work_text]
|
||||
or ecx,90000000h
|
||||
mcall 4,<ICONSX+18,59>,,DAreaIcon
|
||||
|
||||
mov edi,DAreaIcon
|
||||
cmp byte[edi],0
|
||||
jne @f
|
||||
@ -721,7 +721,7 @@ proc DrawSelIcon
|
||||
dec edx
|
||||
jnz .DrawLine
|
||||
|
||||
mcall 7,DlgBufImg,<IMG_SIZE,IMG_SIZE>,<15,15>
|
||||
mcall 7,DlgBufImg,<IMG_SIZE,IMG_SIZE>,<30,15>
|
||||
|
||||
ret
|
||||
endp
|
@ -1,6 +0,0 @@
|
||||
@erase lang.inc
|
||||
@echo lang fix et >lang.inc
|
||||
@fasm -m 16384 @icon.asm @icon
|
||||
@kpack @icon
|
||||
@erase lang.inc
|
||||
@pause
|
5
programs/system/icon_new/build_ru.bat
Normal file
5
programs/system/icon_new/build_ru.bat
Normal file
@ -0,0 +1,5 @@
|
||||
@echo lang fix ru >lang.inc
|
||||
@fasm -m 16384 @icon.asm @icon
|
||||
@erase lang.inc
|
||||
@kpack @icon
|
||||
@pause
|
Loading…
Reference in New Issue
Block a user