From 2166c24d80cc93273e3aca2ab18f930ea38e3a6f Mon Sep 17 00:00:00 2001 From: heavyiron Date: Tue, 15 Oct 2013 11:57:12 +0000 Subject: [PATCH] Panel usability fix: larger buttons without boarders, menu button is on the left now git-svn-id: svn://kolibrios.org@4031 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/eng/panel.ini | 8 ++++---- data/et/panel.ini | 8 ++++---- data/it/panel.ini | 8 ++++---- data/rus/panel.ini | 8 ++++---- data/sp/panel.ini | 8 ++++---- programs/system/panel/trunk/@PANEL.ASM | 2 +- programs/system/panel/trunk/drawtray.inc | 26 ++++++++++++++---------- programs/system/panel/trunk/drawwind.inc | 20 +++++++++++------- programs/system/panel/trunk/i_data.inc | 12 +++++------ 9 files changed, 55 insertions(+), 45 deletions(-) diff --git a/data/eng/panel.ini b/data/eng/panel.ini index bbd906d433..1136ed3d08 100644 --- a/data/eng/panel.ini +++ b/data/eng/panel.ini @@ -1,14 +1,14 @@ [Variables] -PanelHeight=24 +PanelHeight=28 PanelWidth=0 SoftenHeight=4 -ButtonTopOffset=2 -ButtonBottOffset=2 +ButtonTopOffset=4 +ButtonBottOffset=4 [Flags] SoftenUp=1 SoftenDown=1 -MinLeftButton=1 +MinLeftButton=0 MinRightButton=0 MenuButton=1 RunApplButtons=1 diff --git a/data/et/panel.ini b/data/et/panel.ini index bbd906d433..1136ed3d08 100644 --- a/data/et/panel.ini +++ b/data/et/panel.ini @@ -1,14 +1,14 @@ [Variables] -PanelHeight=24 +PanelHeight=28 PanelWidth=0 SoftenHeight=4 -ButtonTopOffset=2 -ButtonBottOffset=2 +ButtonTopOffset=4 +ButtonBottOffset=4 [Flags] SoftenUp=1 SoftenDown=1 -MinLeftButton=1 +MinLeftButton=0 MinRightButton=0 MenuButton=1 RunApplButtons=1 diff --git a/data/it/panel.ini b/data/it/panel.ini index bbd906d433..1136ed3d08 100644 --- a/data/it/panel.ini +++ b/data/it/panel.ini @@ -1,14 +1,14 @@ [Variables] -PanelHeight=24 +PanelHeight=28 PanelWidth=0 SoftenHeight=4 -ButtonTopOffset=2 -ButtonBottOffset=2 +ButtonTopOffset=4 +ButtonBottOffset=4 [Flags] SoftenUp=1 SoftenDown=1 -MinLeftButton=1 +MinLeftButton=0 MinRightButton=0 MenuButton=1 RunApplButtons=1 diff --git a/data/rus/panel.ini b/data/rus/panel.ini index bbd906d433..1136ed3d08 100644 --- a/data/rus/panel.ini +++ b/data/rus/panel.ini @@ -1,14 +1,14 @@ [Variables] -PanelHeight=24 +PanelHeight=28 PanelWidth=0 SoftenHeight=4 -ButtonTopOffset=2 -ButtonBottOffset=2 +ButtonTopOffset=4 +ButtonBottOffset=4 [Flags] SoftenUp=1 SoftenDown=1 -MinLeftButton=1 +MinLeftButton=0 MinRightButton=0 MenuButton=1 RunApplButtons=1 diff --git a/data/sp/panel.ini b/data/sp/panel.ini index bbd906d433..1136ed3d08 100644 --- a/data/sp/panel.ini +++ b/data/sp/panel.ini @@ -1,14 +1,14 @@ [Variables] -PanelHeight=24 +PanelHeight=28 PanelWidth=0 SoftenHeight=4 -ButtonTopOffset=2 -ButtonBottOffset=2 +ButtonTopOffset=4 +ButtonBottOffset=4 [Flags] SoftenUp=1 SoftenDown=1 -MinLeftButton=1 +MinLeftButton=0 MinRightButton=0 MenuButton=1 RunApplButtons=1 diff --git a/programs/system/panel/trunk/@PANEL.ASM b/programs/system/panel/trunk/@PANEL.ASM index bd3ea19a9a..3f08fc401f 100644 --- a/programs/system/panel/trunk/@PANEL.ASM +++ b/programs/system/panel/trunk/@PANEL.ASM @@ -997,7 +997,7 @@ noid16: test eax,eax jz @f - mcall 18,3,edi + mcall 18,2,edi jmp still ;-------------------------------------- align 4 diff --git a/programs/system/panel/trunk/drawtray.inc b/programs/system/panel/trunk/drawtray.inc index 08c1d4c749..4b2423c0a0 100644 --- a/programs/system/panel/trunk/drawtray.inc +++ b/programs/system/panel/trunk/drawtray.inc @@ -25,9 +25,10 @@ draw_tray_buttons: ;-------------------------------------- align 4 @@: - mov ecx,3 shl 16 - add ecx,[height] - sub cx,6 +; mov ecx,3 shl 16 +; add ecx,[height] +; sub cx,6 + mov ecx,[height] mov esi,[wcolor] mov eax,8 ;-------------------------------------- @@ -39,9 +40,10 @@ align 4 mov ebx,[max_x] sub ebx,[offset_x_tray] shl ebx,16 - add ebx,CLOCK_SIZE-2 + add ebx,CLOCK_SIZE+1 + mcall ,,,0x60000000+2 ; time/date button + sub ebx,3 mov [pos_x_clock],ebx - mcall ,,,0x40000000+2 ; time/date button ;-------------------------------------- align 4 @@: @@ -53,9 +55,10 @@ align 4 mov ebx,[max_x] sub ebx,[offset_x_tray] shl ebx,16 - add ebx,CPU_USAGE_SIZE-2 + add ebx,CPU_USAGE_SIZE+1 + mcall ,,,0x60000000+18 ;button 18 - sysmeter_name (GMON) + sub ebx,3 mov [pos_x_cpu_usage],ebx - mcall ,,,0x40000000+18 ;button 18 - sysmeter_name (GMON) ;-------------------------------------- align 4 @@: @@ -67,9 +70,10 @@ align 4 mov ebx,[max_x] sub ebx,[offset_x_tray] shl ebx,16 - add ebx,CHLANG_SIZE-2 + add ebx,CHLANG_SIZE+1 + mcall ,,,0x60000000+16 ;button 16 - chang language + sub ebx,3 mov [pos_x_cpu_chlang],ebx - mcall ,,,0x40000000+16 ;button 16 - chang language ;-------------------------------------- align 4 @@: @@ -83,11 +87,11 @@ align 4 shl ebx,16 add ebx,10 mov [pos_x_page_list],ebx - mcall ,,,0x40000000+22 ;button 22 - page list decrease + mcall ,,,0x60000000+22 ;button 22 - page list decrease add ebx,24 shl 16 - mcall ,,,0x40000000+21 ;button 21 - page list decrease + mcall ,,,0x60000000+21 ;button 21 - page list decrease ;-------------------------------------- align 4 @@: diff --git a/programs/system/panel/trunk/drawwind.inc b/programs/system/panel/trunk/drawwind.inc index 6bc9ea569a..cd91fa2353 100644 --- a/programs/system/panel/trunk/drawwind.inc +++ b/programs/system/panel/trunk/drawwind.inc @@ -256,7 +256,8 @@ draw_menu_and_clean_desktop: ;-------------------------------------- align 4 @@: - call calculate_button_y_coordinate_and_size +; call calculate_button_y_coordinate_and_size + mov ecx, [height] mov edx, 0x40d1ff01 ; mov edx, 0xd1ff01 ; add edx, [button_frames] @@ -278,11 +279,13 @@ align 4 and eax,0xffff mov [menu_button_y.size],eax + call calculate_button_y_coordinate_and_size mov edx,[MenuButton_color] ;0x44aa44 mov esi,[wcolor] + add ebx,3 shl 16 - 5 call draw_appl_button - add ebx, 8*65536 + add ebx, 6*65536 mov bx,[height] shr bx,1 sub bx,3 @@ -320,10 +323,12 @@ align 4 ; Inserted code for drawing buttons 103, 104, 105 (Clean, Restore, Exchange windows) mov esi, dword [system_colours+24] ; drawing buttons and esi, 0x00ffffff - mov edx, 0x40000000 + 103 - call calculate_button_y_coordinate_and_size + mov edx, 0x60000000 + 103 +; call calculate_button_y_coordinate_and_size + mov ecx, [height] mcall 8 ;,,<3,13> + call calculate_button_y_coordinate_and_size mov edx,[CleanDesktopButton_color] ;time_bgr_color mov esi,[wcolor] call draw_appl_button @@ -411,9 +416,10 @@ align 4 mov edx,edi add edx,52 or edx,0x60000000 - mov ecx, 1*65536 - add ecx, [height] - sub ecx,3 +; mov ecx, 1*65536 +; add ecx, [height] +; sub ecx,3 + mov ecx, [height] mcall 8,,,,[wcolor] inc edi diff --git a/programs/system/panel/trunk/i_data.inc b/programs/system/panel/trunk/i_data.inc index c908632c96..76bc3079aa 100644 --- a/programs/system/panel/trunk/i_data.inc +++ b/programs/system/panel/trunk/i_data.inc @@ -24,10 +24,10 @@ m_icon: dd 0xffffff lsz m_text,\ - ru, "",\ - en, "MENU",\ + ru, "",\ + en, "Menu",\ et, "MEN",\ - sp, "MENU" + sp, "Menu" mi_text db 'WAVETETRBGRDGPL ' @@ -118,14 +118,14 @@ menu_button_y: width: dd 0 ;305 height: dd 30 ;18 soften_height: dd 5 -button_top_offset: dd 3 -button_bottom_offset: dd 3 +button_top_offset: dd 0 +button_bottom_offset: dd 0 ;------------------------------------------------------------------------------ ; INI flags ;buttons dd 1 ; 0 no frames ; 1 frames soften_up: dd 1 ; 0 no ; 1 yes soften_down: dd 0 ; 0 no ; 1 yes -minimize_left: dd 1 +minimize_left: dd 0 minimize_right: dd 1 ;icons_position dd 95 ; not used! menu_enable: dd 1