Color Dialog - some redesign of the 'history of selected colors' area.

git-svn-id: svn://kolibrios.org@3476 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2013-04-18 00:14:59 +00:00
parent b1640343a9
commit 2d22e5927b
4 changed files with 64 additions and 11 deletions

View File

@ -1745,10 +1745,10 @@ ColorDialog_data:
.draw_window dd thread4.draw_window ;+20 .draw_window dd thread4.draw_window ;+20
.status dd 0 ;+24 .status dd 0 ;+24
.x: .x:
.x_size dw 420 ;+28 ; Window X size .x_size dw 510 ;+28 ; Window X size
.x_start dw 10 ;+30 ; Window X position .x_start dw 10 ;+30 ; Window X position
.y: .y:
.y_size dw 320 ;+32 ; Window y size .y_size dw 310 ;+32 ; Window y size
.y_start dw 10 ;+34 ; Window Y position .y_start dw 10 ;+34 ; Window Y position
.color_type dd 0 ;+36 ; 0- RGB, 1 or other - reserved .color_type dd 0 ;+36 ; 0- RGB, 1 or other - reserved
.color dd 0 ;+40 ; Selected color .color dd 0 ;+40 ; Selected color

View File

@ -276,12 +276,12 @@ get_communication_area:
mov ebx,[eax+4] mov ebx,[eax+4]
; cmp bx,word x_minimal_size ;300 ; cmp bx,word x_minimal_size ;300
; jb @f ; jb @f
mov bx,450 mov bx,510
mov [window_x],ebx mov [window_x],ebx
mov ebx,[eax+8] mov ebx,[eax+8]
; cmp bx,word y_minimal_size ;200 ; cmp bx,word y_minimal_size ;200
; jb @f ; jb @f
mov bx,320 mov bx,310
mov [window_y],ebx mov [window_y],ebx
@@: @@:
ret ret
@ -476,31 +476,78 @@ draw_scrollbars:
call [scrollbar_ver_draw] call [scrollbar_ver_draw]
ret ret
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
align 4
draw_history_frame:
mov [frame_data.x],dword (c_start_x+c_size_x*2+10*2)*65536+80
mov [frame_data.y],dword (p_start_y+5)*65536+(p_size_y-5)
mov [frame_data.draw_text_flag],dword 1
mov [frame_data.text_pointer],dword history_text
push dword frame_data
call [Frame_draw]
ret
;---------------------------------------------------------------------
align 4
draw_button_row: draw_button_row:
mov edx,0x60000000 + 30 ; BUTTON ROW mov edx,0x60000000 + 30 ; BUTTON ROW
; mov ebx,220*65536+14 ; mov ebx,220*65536+14
mov ebx,(c_start_x+c_size_x*2+10*3)*65536+14 mov ebx,(c_start_x+c_size_x*2+10*3)*65536+14
mov ecx,20*65536+14 mov ecx,25*65536+14
mov eax,8 mov eax,8
;----------------------------------- ;-----------------------------------
align 4
.newb: .newb:
mcall mcall
add ecx,25*65536 add ecx,24*65536
inc edx inc edx
cmp edx,0x60000000 + 39 cmp edx,0x60000000 + 39
jbe .newb jbe .newb
ret ret
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
align 4
draw_color_value:
mov ebx,(c_start_x+c_size_x*3+10)*65536+(c_size_x-1)
mov ecx,28*65536+11
mov edx,0xffffff
mov eax,13
mov edi,10
mov esi,[communication_area]
add esi,28
;-----------------------------------
align 4
@@:
mcall
pusha
mov edx,ebx
add edx,2 shl 16
shr ecx,16
mov dx,cx
add dx,2
mov ecx,[esi]
and ecx,0xffffff
mcall 47,0x00060100,,,0
popa
add ecx,24*65536
add esi,4
dec edi
jnz @b
ret
;---------------------------------------------------------------------
align 4
draw_colours: draw_colours:
mov edi,10 mov edi,10
mov esi,[communication_area] mov esi,[communication_area]
add esi,28 add esi,28
; mov ebx,220*65536+14 ; mov ebx,220*65536+14
mov ebx,(c_start_x+c_size_x*2+10*3)*65536+14 mov ebx,(c_start_x+c_size_x*2+10*3)*65536+14
mov ecx,20*65536+14 mov ecx,27*65536+14
mov eax,13 mov eax,13
mov [frame_data.draw_text_flag],dword 0 mov [frame_data.draw_text_flag],dword 0
;-------------------------------------- ;--------------------------------------
align 4
newcol: newcol:
mov edx,[esi] mov edx,[esi]
mcall mcall
@ -520,7 +567,7 @@ newcol:
pop ecx ebx pop ecx ebx
add ecx,25*65536 add ecx,24*65536
add esi,4 add esi,4
dec edi dec edi
@ -547,8 +594,10 @@ draw_window:
mov [scroll_bar_data_green.all_redraw],eax mov [scroll_bar_data_green.all_redraw],eax
mov [scroll_bar_data_blue.all_redraw],eax mov [scroll_bar_data_blue.all_redraw],eax
call draw_scrollbars call draw_scrollbars
call draw_history_frame
call draw_button_row call draw_button_row
call draw_colours call draw_colours
call draw_color_value
mcall 12,2 mcall 12,2
ret ret
;--------------------------------------------------------------------- ;---------------------------------------------------------------------

View File

@ -1,6 +1,10 @@
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
title: title:
db 'ColorDialog',0 db 'ColorDialog',0
history_text:
db ' History: ',0
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
align 4 align 4
window_x: window_x:
@ -239,5 +243,5 @@ frame_data:
.font_number dd 0 ;+32 .font_number dd 0 ;+32
.font_size_y dd 9 ;+36 .font_size_y dd 9 ;+36
.font_color dd 0x0 ;+40 .font_color dd 0x0 ;+40
.font_backgr_color dd 0xffffff ;+44 .font_backgr_color dd 0xAABBCC ;+44
;--------------------------------------------------------------------- ;---------------------------------------------------------------------

View File

@ -326,10 +326,10 @@ ColorDialog_data:
.draw_window dd draw_window ;+20 .draw_window dd draw_window ;+20
.status dd 0 ;+24 .status dd 0 ;+24
.x: .x:
.x_size dw 420 ;+28 ; Window X size .x_size dw 510 ;+28 ; Window X size
.x_start dw 10 ;+30 ; Window X position .x_start dw 10 ;+30 ; Window X position
.y: .y:
.y_size dw 320 ;+32 ; Window y size .y_size dw 310 ;+32 ; Window y size
.y_start dw 10 ;+34 ; Window Y position .y_start dw 10 ;+34 ; Window Y position
.color_type dd 0 ;+36 ; 0- RGB, 1 or other - reserved .color_type dd 0 ;+36 ; 0- RGB, 1 or other - reserved
.color dd 0 ;+40 ; Selected color .color dd 0 ;+40 ; Selected color