TASK PANEL v2.1

1) Added color selection for the text.
2) Show "change page list" only if the applications does not fit in the panel.
3) Display file names up to 11 char previously displ. only 8 char.

git-svn-id: svn://kolibrios.org@2626 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2012-04-17 22:58:52 +00:00
parent 8d6608fe2d
commit 8bc17ae113
11 changed files with 124 additions and 41 deletions

View File

@ -16,7 +16,6 @@ ClnDesktButton=1
Clock=1
CpuUsage=1
ChangeLang=1
PageList=1
Attachment=1
ButtonsStyle=1
@ -28,4 +27,4 @@ CpuUsage=0,100,0
CpuUsageBckgr=255,0,0
ChangeLang=0,128,255
PageList=255,255,255
Text=255,255,255

View File

@ -16,7 +16,6 @@ ClnDesktButton=1
Clock=1
CpuUsage=1
ChangeLang=1
PageList=1
Attachment=1
ButtonsStyle=1
@ -28,4 +27,4 @@ CpuUsage=0,100,0
CpuUsageBckgr=255,0,0
ChangeLang=0,128,255
PageList=255,255,255
Text=255,255,255

View File

@ -16,7 +16,6 @@ ClnDesktButton=1
Clock=1
CpuUsage=1
ChangeLang=1
PageList=1
Attachment=1
ButtonsStyle=1
@ -28,4 +27,4 @@ CpuUsage=0,100,0
CpuUsageBckgr=255,0,0
ChangeLang=0,128,255
PageList=255,255,255
Text=255,255,255

View File

@ -16,7 +16,6 @@ ClnDesktButton=1
Clock=1
CpuUsage=1
ChangeLang=1
PageList=1
Attachment=1
ButtonsStyle=1
@ -28,4 +27,4 @@ CpuUsage=0,100,0
CpuUsageBckgr=255,0,0
ChangeLang=0,128,255
PageList=255,255,255
Text=255,255,255

View File

@ -4,6 +4,14 @@
; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;------------------------------------------------------------------------------
; version: 2.1
; last update: 18/04/2012
; changed by: Marat Zakiyanov aka Mario79, aka Mario
; changes: Added color selection for the text.
; Show "change page list" only if the applications
; does not fit in the panel.
; Display file names up to 11 char previously displ. only 8 char.
;------------------------------------------------------------------------------
; version: 2.0
; last update: 17/04/2012
; changed by: Marat Zakiyanov aka Mario79, aka Mario
@ -47,7 +55,7 @@ ML_SIZE = 10
MR_SIZE = 10
MENU_SIZE = 50
CLD_SIZE = 20
TAB_SIZE = 60
TAB_SIZE = 75 ;60
TRAY_SIZE = 140
CLOCK_SIZE = 40
@ -240,6 +248,8 @@ start_run_application:
cmp [win_key_flag],1
je @f
ret
;--------------------------------------
align 4
@@:
mov [start_menu_flag],1
mov [draw_window_1], 1
@ -252,6 +262,8 @@ minimize_all_windows:
cmp [win_key_flag],1
je @f
ret
;--------------------------------------
align 4
@@:
mov [start_menu_flag],1
call clean_desktop
@ -287,6 +299,8 @@ alt_tab_pressed:
xor edx, edx
mov ebx, procinfo_window_tabs
mov ecx, 1
;--------------------------------------
align 4
.fill:
inc ecx
mcall 9
@ -586,6 +600,14 @@ align 4
cmp eax,1 ; redraw ?
jz red
push eax
mov eax,[redraw_window_flag]
test eax,eax
jz @f
call draw_window
@@:
pop eax
cmp eax,2
jnz @f
call handle_key
@ -986,8 +1008,12 @@ draw_small_right:
mov bx,[height]
shr bx,1
sub bx,3
mov ecx,[wcolor]
add ecx,0x303030
; mov ecx,[wcolor]
; add ecx,0x303030
mov edx,[wcolor]
mov eax,COLOR_CHANGE_MAGNITUDE_2
call add_color_change_magnitude
mov ecx,edx
mcall 4,,,hidetext,1
mcall 12,2
@ -1014,8 +1040,12 @@ draw_small_left:
mov bx,[height]
shr bx,1
sub bx,3
mov ecx,[wcolor]
add ecx,0x303030
; mov ecx,[wcolor]
; add ecx,0x303030
mov edx,[wcolor]
mov eax,COLOR_CHANGE_MAGNITUDE_2
call add_color_change_magnitude
mov ecx,edx
mcall 4,,,hidetext+1,1
mcall 12,2

View File

@ -173,7 +173,7 @@ align 4
call draw_appl_button
pop edi
;------------------------------------------------------------------------------
add ebx,5 shl 16
add ebx,4 shl 16
mov bx,cx ;[height]
shr bx,1
sub bx,4
@ -188,9 +188,42 @@ align 4
inc edi
cmp edi, [max_applications]
jb .loop
mov ecx,[app_list+edi*4]
cmp ecx,-1
jz .done
xor eax,eax
cmp [page_list],eax
jne @f
inc eax
cmp [page_list_enable],eax
je @f
mov [page_list_enable],eax
mov [redraw_window_flag],eax
;--------------------------------------
align 4
@@:
pop ebp
ret
;--------------------------------------
align 4
.done:
xor eax,eax
cmp [page_list],eax
jne @f
cmp [page_list_enable],eax
je @f
mov [page_list_enable],eax
inc eax
mov [redraw_window_flag],eax
;--------------------------------------
align 4
@@:
pop ebp
ret
;------------------------------------------------------------------------------

View File

@ -144,12 +144,14 @@ draw_time:
add ebx,18 shl 16
mov ecx,[bte]
; mov ecx,[bte]
mov ecx,[PanelText_color]
or ecx,0x40000000
mov edx,[esp] ; __:_X
and edx,15
add ebx,10*65536
add edx,text
mcall 4,,0x40ffffff,,1,[Clock_color] ;time_bgr_color
mcall 4,,,,1,[Clock_color] ;time_bgr_color
pop edx ; __:X_
shr edx,4
@ -188,7 +190,8 @@ draw_time:
mov ecx,eax
shr ecx,16
and ecx,1
mov edx,[bte]
; mov edx,[bte]
mov edx,[PanelText_color]
sub edx,[Clock_color] ;time_bgr_color;[wcolor]
imul ecx,edx
add ecx,[Clock_color] ;time_bgr_color;[wcolor]
@ -209,9 +212,11 @@ draw_list_button:
mov ebx,[pos_x_page_list]
mov bx,10
mov ecx,3 shl 16
add ecx,[height]
sub cx,6
call calculate_button_y_coordinate_and_size
; mov ecx,3 shl 16
; add ecx,[height]
; sub cx,6
xor edx,edx
; mcall 13
@ -240,10 +245,19 @@ draw_list_button:
; draw page list button text <>
mov ebx,[pos_x_page_list]
add ebx,2 shl 16
mov eax,[height]
; mov eax,[height]
; shr eax,1
; sub eax,4
; mov bx,ax
call calculate_button_y_coordinate_and_size
movzx eax,cx
shr eax,1
sub eax,4
shr ecx,16
add eax,ecx
mov bx,ax
xor ecx,ecx
mcall 4,,,page_a1,5
@ -253,7 +267,7 @@ draw_list_button:
; draw page list number
mov edx,ebx
add edx,9 shl 16
mcall 47,0x20000,[page_list],,0xffffff
mcall 47,0x20000,[page_list],,[system_colours.work_button_text]
.exit:
ret
;------------------------------------------------------------------------------
@ -378,7 +392,8 @@ draw_flag:
add eax,ecx
mov bx,ax
mov ecx,[bte] ; color
; mov ecx,[bte] ; color
mov ecx,[PanelText_color]
if caps_lock_check
; make flag_text 'enfigerufretua' or 'ENFIGERUFRETUA' depending on CapsLock state.

View File

@ -70,6 +70,7 @@ align 4
call draw_tray
call draw_application_buttons
mov [redraw_window_flag],0
mcall 12,2
popa
ret
@ -181,8 +182,12 @@ minimize_left_button:
mov bx,[height]
shr bx,1
sub bx,3
mov ecx,[wcolor]
add ecx,0x303030
; mov ecx,[wcolor]
; add ecx,0x303030
mov edx,[wcolor]
mov eax,COLOR_CHANGE_MAGNITUDE_2
call add_color_change_magnitude
mov ecx,edx
mcall 4,,,hidetext,1 ; HIDE TEXT
;--------------------------------------
align 4
@ -215,8 +220,12 @@ minimize_right_button:
mov bx,[height]
shr bx,1
sub bx,3
mov ecx,[wcolor]
add ecx,0x303030
; mov ecx,[wcolor]
; add ecx,0x303030
mov edx,[wcolor]
mov eax,COLOR_CHANGE_MAGNITUDE_2
call add_color_change_magnitude
mov ecx,edx
mov esi,1
mcall 4,,,hidetext+1
;--------------------------------------
@ -270,7 +279,9 @@ align 4
mov bx,[height]
shr bx,1
sub bx,3
mcall 4,,0x10ffffff,m_text,4
mov ecx,[PanelText_color]
or ecx,0x10000000
mcall 4,,,m_text,4
;--------------------------------------
align 4
no_menu:
@ -308,7 +319,7 @@ align 4
; mov ecx, dword [system_colours+28]
; and ecx, 0x00ffffff
mov ecx,0xffffff
mov ecx,[PanelText_color]
add ebx,5 shl 16
; mov bx,6
mov bx,[height]

View File

@ -67,7 +67,7 @@ text db '0123456789'
page_a1 db '< >'
page_clean_but db 25,24,18
bte dd 0xccddee
;bte dd 0x0 ;ccddee
wcolor dd 0x506070
@ -164,10 +164,12 @@ clean_desktop_enable: dd 1
clock_enable: dd 1
cpu_usage_enable: dd 1
chlang_enable: dd 1
page_list_enable: dd 1
place_attachment dd 1
button_style dd 1
;------------------------------------------------------------------------------
page_list_enable: dd 0
redraw_window_flag dd 0
;------------------------------------------------------------------------------
; INI colors
MenuButton_color dd 0x44aa44 ; Green
CleanDesktopButton_color dd 0x66cc ; Blue
@ -176,6 +178,7 @@ CpuUsage_color dd 0x44aa44 ; Green
CpuUsageBckgr_color dd 0xdd2222 ; Red
ChangeLang_color dd 0x66cc ; Blue
PageList_color dd 0xffffff ; White
PanelText_color dd 0xffffff ; White
;------------------------------------------------------------------------------
aVariables db 'Variables',0
aPanelHeight db 'PanelHeight',0
@ -201,6 +204,7 @@ aButtonsStyle db 'ButtonsStyle',0
;------------------------------------------------------------------------------
aColors db 'Colors',0
aCpuUsageBckgr db 'CpuUsageBckgr',0
aPanelText db 'Text',0
;------------------------------------------------------------------------------
plugins_directory db 0

View File

@ -142,14 +142,6 @@ Get_ini:
mov eax,1
@@:
mov [chlang_enable],eax
;--------------------------------------
invoke ini_get_int,library_path,aFlags,aPageList,1
cmp eax,2
jb @f
mov eax,1
@@:
mov [page_list_enable],eax
;--------------------------------------
invoke ini_get_int,library_path,aFlags,aAttachment,1
cmp eax,2
@ -187,6 +179,9 @@ Get_ini:
;--------------------------------------
invoke ini_get_color,library_path,aColors,aPageList,0xffffff
mov [PageList_color],eax
;--------------------------------------
invoke ini_get_color,library_path,aColors,aPanelText,0xffffff
mov [PanelText_color],eax
;--------------------------------------
; invoke ini_get_str,library_path,aConvertPlugins,aCP0,plugin_0_name,127,ConvertPlugins_no_key

View File

@ -16,7 +16,6 @@ ClnDesktButton=1
Clock=1
CpuUsage=1
ChangeLang=1
PageList=1
Attachment=1
ButtonsStyle=1
@ -28,4 +27,4 @@ CpuUsage=0,100,0
CpuUsageBckgr=255,0,0
ChangeLang=0,128,255
PageList=255,255,255
Text=255,255,255