From a92e5cb86267e1494c5d489847cfac010d0ca36f Mon Sep 17 00:00:00 2001 From: eAndrew Date: Sun, 3 Nov 2013 16:32:45 +0000 Subject: [PATCH] Docky v5.1 New namewindow style for all dock positions Increase size of hidden window Add IRC git-svn-id: svn://kolibrios.org@4157 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/common/settings/docky.ini | 9 +++- programs/system/docky/trunk/MEMORY.INC | 9 ++++ programs/system/docky/trunk/NAME.INC | 65 +++++++++++++++++++------- programs/system/docky/trunk/docky.asm | 17 +++++-- 4 files changed, 76 insertions(+), 24 deletions(-) diff --git a/data/common/settings/docky.ini b/data/common/settings/docky.ini index 89efb95ff5..47d36397d2 100644 --- a/data/common/settings/docky.ini +++ b/data/common/settings/docky.ini @@ -26,7 +26,14 @@ separator=1 [HTMLv] path=/sys/htmlv param= -icon=7 +icon=31 + +[IRC] +path=/SYS/NETWORK/IRCC +param= +icon=29 + +separator=1 [TinyPad] path=/sys/tinypad diff --git a/programs/system/docky/trunk/MEMORY.INC b/programs/system/docky/trunk/MEMORY.INC index 6118ffe9cc..11128e3fa9 100644 --- a/programs/system/docky/trunk/MEMORY.INC +++ b/programs/system/docky/trunk/MEMORY.INC @@ -71,6 +71,15 @@ nwin: .height: rd 1 + .bgx: + rd 1 + .bgy: + rd 1 + .bgwidth: + rd 1 + .bgheight: + rd 1 + .visible: rd 1 .sid: diff --git a/programs/system/docky/trunk/NAME.INC b/programs/system/docky/trunk/NAME.INC index 33d4403545..654c8cb565 100644 --- a/programs/system/docky/trunk/NAME.INC +++ b/programs/system/docky/trunk/NAME.INC @@ -1,4 +1,10 @@ n_main: + mov dword[nwin.width], 67 + mov dword[nwin.height], 16 + + mov dword[nwin.bgwidth], 66 + mov dword[nwin.bgheight], 1 + cmp dword[dock_items.location], 1 je .top cmp dword[dock_items.location], 4 @@ -6,27 +12,52 @@ cmp dword[dock_items.location], 3 je .bottom jmp .left + .top: mov eax, [win.height_opn] mov [nwin.y], eax + + mov dword[nwin.bgx], 1 + jmp @f - .right: - mov eax, [win.x_opn] - sub eax, 72 - mov [nwin.x], eax - jmp @f - .bottom: - mov eax, [win.y_opn] - sub eax, 20 - mov [nwin.y], eax - jmp @f + .left: mov eax, [win.width_opn] - add eax, 4 mov [nwin.x], eax + + mov dword[nwin.bgy], 1 + mov dword[nwin.bgwidth], 1 + mov eax, [nwin.height] + dec eax + mov dword[nwin.bgheight], eax + + jmp @f + + .bottom: + mov eax, [win.y_opn] + sub eax, 16 + mov [nwin.y], eax + + mov dword[nwin.bgx], 1 + mov eax, [nwin.height] + mov [nwin.bgy], eax + + jmp @f + + .right: + mov eax, [win.x_opn] + sub eax, 67 + mov [nwin.x], eax + + mov eax, [nwin.width] + mov [nwin.bgx], eax + mov dword[nwin.bgy], 1 + mov dword[nwin.bgwidth], 1 + mov eax, [nwin.height] + dec eax + mov dword[nwin.bgheight], eax + @@: - mov dword[nwin.width], 67 - mov dword[nwin.height], 16 mcall 40, 1b @@ -75,9 +106,7 @@ n_event_redraw: mcall 0, <[nwin.x], [nwin.width]>, <[nwin.y], [nwin.height]>, [color.bg], [color.bg], [color.frame] - dec dword[nwin.width] - mcall 13, <1, [nwin.width]>, <0, 1>, [color.bg] - inc dword[nwin.width] + mcall 13, <[nwin.bgx], [nwin.bgwidth]>, <[nwin.bgy], [nwin.bgheight]>, [color.bg] mov edx, [win.button_index] imul edx, 16 @@ -92,9 +121,9 @@ n_event_redraw: imul eax, 3 mov ebx, 34 sub ebx, eax - inc ebx + add ebx, 1 shl ebx, 16 - add ebx, 4 + add ebx, 5 mcall 4, , [color.text] diff --git a/programs/system/docky/trunk/docky.asm b/programs/system/docky/trunk/docky.asm index f55782b3ff..3a291007ff 100644 --- a/programs/system/docky/trunk/docky.asm +++ b/programs/system/docky/trunk/docky.asm @@ -8,6 +8,7 @@ include "../../../proc32.inc" include "../../../dll.inc" include "../../../develop/libraries/box_lib/load_lib.mac" + ;include "../../../debug.inc" include "DATA.INC" include "NAME.INC" @@ -161,7 +162,7 @@ main: .HORZ_HEIGHT: mov dword[win.height_opn], BUTTON_SIZE - mov dword[win.height_hdn], 0 + mov dword[win.height_hdn], 3 ret @@ -170,7 +171,7 @@ main: and eax, 0xFFFF dec eax mov [win.y_hdn], eax - sub eax, 40 + sub eax, 43 mov [win.y_opn], eax ret @@ -183,7 +184,7 @@ main: .VERT_WIDTH: mov dword[win.width_opn], BUTTON_SIZE - mov dword[win.width_hdn], 0 + mov dword[win.width_hdn], 3 ret @@ -301,6 +302,7 @@ event_redraw: mcall , edi, <0, BUTTON_SIZE> jmp .endbtn .vert_btn: + sub edi, 12 shl 16 mcall , <0, BUTTON_SIZE>, edi .endbtn: pop edi @@ -326,6 +328,7 @@ event_redraw: mcall , , <4, 36>, [color.frame] jmp .end_inner_sep .vert_draw_sep: + sub ebx, 12 shl 16 mov ecx, ebx mcall , <4, 36>, , [color.frame] .end_inner_sep: @@ -429,6 +432,7 @@ event_mouse: .vert: mov eax, esi + add eax, 12 .nxt: sub eax, 12 @@ -456,13 +460,16 @@ event_mouse: je .vert_name add eax, [win.x] mov [nwin.x], eax + mov byte[nwin.change_shape], 1 + mcall 13, <0, [win.width]>, <[win.height], 1>, [color.frame] jmp .vert_end .vert_name: add eax, [win.y] + add eax, 14 mov [nwin.y], eax - .vert_end: mov byte[nwin.change_shape], 1 - mcall 13, <0, [win.width]>, <[win.height], 1>, [color.frame] + mcall 13, <[win.width], 1>, <0, [win.height]>, [color.frame] + .vert_end: cmp byte[win.state], 1 je main_loop