mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-24 23:56:49 +03:00
change scrollbars sizes
git-svn-id: svn://kolibrios.org@6358 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
6f44ae55dd
commit
a18a9cc46b
@ -45,6 +45,15 @@ include '../../../libio.inc'
|
||||
|
||||
;---------------------------------------------------------
|
||||
; *** ª®áâ âë ¤«ï ¨â¥à䥩á ***
|
||||
; *** constants for interface ***
|
||||
|
||||
; ª®à४â¨à®¢ª¨ ᪨
|
||||
ci_offs_skin_w equ 0 ; 5 ;ª®à४â¨à®¢ª è¨à¨ã à ¬ª¨ ᪨
|
||||
ci_offs_skin_h equ 0 ;24 ;ª®à४â¨à®¢ª ¢ëá®âã ᪨
|
||||
|
||||
; £« ¢®¥ ®ª®
|
||||
ci_wnd_min_siz_x equ 585 ;minimum size x
|
||||
ci_wnd_min_siz_y equ 400 ;minimum size y
|
||||
|
||||
; ®ª® । ªâ®à
|
||||
ci_edit_wnd_x_pos equ 5 ;ª®®à¤¨ â x ¤«ï ®ª । ªâ®à
|
||||
@ -52,6 +61,7 @@ ci_edit_wnd_y_pos equ 87 ;
|
||||
ci_edit_wnd_border equ 3 ;à ¬ª ¢®ªà㣠®ª । ªâ®à
|
||||
|
||||
; áªà®««¨£¨
|
||||
ci_scroll_dim equ 22 ;à §¬¥àë áªà®««¨£®¢
|
||||
ci_scrollh_coord_x_min equ (ci_edit_wnd_x_pos+3) ;¬¨¨¬ «ì ï ¯®§¨æ¨ï ¯®«§ãª
|
||||
;£®à¨§®â «ì®£® áªà®««¨£
|
||||
ci_scrollv_coord_y_min equ (ci_edit_wnd_y_pos+3) ;¬¨¨¬ «ì ï ¯®§¨æ¨ï ¯®«§ãª
|
||||
@ -118,11 +128,12 @@ include 'init_data.inc'
|
||||
push dword OpenDialog_data
|
||||
call [OpenDialog_Init]
|
||||
;---------------------------------------------------------------------
|
||||
red:
|
||||
call drawwin
|
||||
;----------------------------------------------------------
|
||||
;---------------------MAIN LOOP----------------------------
|
||||
;----------------------------------------------------------
|
||||
red:
|
||||
call drawwin
|
||||
align 4
|
||||
still:
|
||||
call event
|
||||
|
||||
|
@ -2,14 +2,14 @@
|
||||
;-------------interraction MOUSE--------------
|
||||
;---------------------------------------------
|
||||
mouse:
|
||||
or ecx,-1
|
||||
or ecx,-1
|
||||
mcall SF_THREAD_INFO,procinfo
|
||||
|
||||
mov eax,[procinfo+70] ;staus of window
|
||||
test eax,100b
|
||||
test eax,100b
|
||||
jne still
|
||||
|
||||
call GetMouseCoordinats
|
||||
call GetMouseCoordinats
|
||||
;panel
|
||||
mov edx,[Window_SizeX]
|
||||
sub edx,5
|
||||
@ -23,10 +23,10 @@ mouse:
|
||||
cmp eax,5
|
||||
jle no_panel
|
||||
|
||||
cmp eax,edx ;585
|
||||
cmp eax,edx
|
||||
jae no_panel
|
||||
|
||||
call GetMouseCoordinats
|
||||
call GetMouseCoordinats
|
||||
mov [counter],7
|
||||
mov edi,panel_text
|
||||
jmp panel_interraction
|
||||
@ -40,7 +40,7 @@ no_panel:
|
||||
jmp panel_interraction
|
||||
|
||||
no_redraw_panel:
|
||||
call GetMouseCoordinats
|
||||
call GetMouseCoordinats
|
||||
mov eax,[MouseX]
|
||||
mov ebx,[MouseY]
|
||||
mov ecx,[WorkScreen_SizeX]
|
||||
@ -78,7 +78,7 @@ mouse_scroll:
|
||||
mov ebx,[Scroll1CoordinatY]
|
||||
mov ecx,[Scroll1MaxSizeX]
|
||||
inc ecx
|
||||
mov edx,14+10
|
||||
mov edx,ci_scroll_dim-6
|
||||
mov esi,7
|
||||
call draw_volume_rectangle ; horizontal scrollbar clear
|
||||
|
||||
@ -128,7 +128,7 @@ no_horizontal:
|
||||
|
||||
mov eax,[Scroll2CoordinatX]
|
||||
mov ebx,ci_scrollv_coord_y_min
|
||||
mov ecx,14+10
|
||||
mov ecx,ci_scroll_dim-6
|
||||
mov edx,[Scroll2MaxSizeY]
|
||||
inc edx
|
||||
mov esi,7
|
||||
|
@ -13,21 +13,22 @@ drawwin:
|
||||
mov [Window_CordinatX],eax
|
||||
mov [Window_CordinatY],ebx
|
||||
|
||||
cmp ecx,585
|
||||
jae @f
|
||||
mov ecx,585 ;minimum size x
|
||||
cmp ecx,ci_wnd_min_siz_x
|
||||
jge @f
|
||||
mov ecx,ci_wnd_min_siz_x
|
||||
@@:
|
||||
cmp [Window_SizeY],400
|
||||
jae @f
|
||||
mov edx,400 ;minimum size y
|
||||
cmp edx,ci_wnd_min_siz_y
|
||||
jge @f
|
||||
mov edx,ci_wnd_min_siz_y
|
||||
@@:
|
||||
mov [Window_SizeX],ecx
|
||||
mov [Window_SizeY],edx
|
||||
|
||||
mov [MaxWorkScreen_SizeX],ecx
|
||||
mov [MaxWorkScreen_SizeY],edx
|
||||
sub [MaxWorkScreen_SizeX],ci_edit_wnd_x_pos+2*ci_edit_wnd_border+34
|
||||
sub [MaxWorkScreen_SizeY],ci_edit_wnd_y_pos+2*ci_edit_wnd_border+34
|
||||
sub [MaxWorkScreen_SizeX],ci_edit_wnd_x_pos+2*ci_edit_wnd_border\
|
||||
+ci_scroll_dim+ci_offs_skin_w+5
|
||||
sub [MaxWorkScreen_SizeY],ci_edit_wnd_y_pos+2*ci_edit_wnd_border\
|
||||
+ci_scroll_dim+ci_offs_skin_h+5
|
||||
|
||||
cmp [MaxWorkScreen_SizeX],0
|
||||
jns no_znak1
|
||||
@ -48,12 +49,12 @@ no_znak2:
|
||||
mov ecx,50 ;[Window_CordinatY]
|
||||
shl ebx,16
|
||||
shl ecx,16
|
||||
add ebx,[Window_SizeX]
|
||||
add ecx,[Window_SizeY]
|
||||
add ebx, [Window_SizeX]
|
||||
add ecx, [Window_SizeY]
|
||||
mcall SF_CREATE_WINDOW,,,0x53aabbcc,,name_of_program
|
||||
|
||||
mov eax,[procinfo+70] ;staus of window
|
||||
test eax,100b
|
||||
test eax,100b
|
||||
jne .end
|
||||
|
||||
;------------------------------------------------
|
||||
@ -84,12 +85,15 @@ no_znak2:
|
||||
;------------------------------------------------
|
||||
mov ebx,[WorkScreen_SizeX]
|
||||
add ebx,ci_edit_wnd_x_pos+ci_edit_wnd_border
|
||||
mov edx,[Window_SizeX]
|
||||
sub edx,ebx
|
||||
sub edx,ci_scroll_dim+5-ci_edit_wnd_border
|
||||
shl ebx,16
|
||||
mov bx,ci_edit_wnd_border ;è¨à¨ ¡®à¤îà
|
||||
mov bx,dx ;è¨à¨ ¡®à¤îà
|
||||
|
||||
mov ecx,ci_edit_wnd_y_pos+ci_edit_wnd_border
|
||||
mov edx,[Window_SizeY]
|
||||
sub edx,ci_edit_wnd_y_pos+2*ci_edit_wnd_border+34
|
||||
sub edx,ci_edit_wnd_y_pos+2*ci_edit_wnd_border+ci_scroll_dim+5+ci_offs_skin_h
|
||||
shl ecx,16
|
||||
mov cx,dx ;¢ëá®â ¡®à¤îà
|
||||
|
||||
@ -99,14 +103,17 @@ no_znak2:
|
||||
;------------------------------------------------
|
||||
mov ebx,ci_edit_wnd_x_pos
|
||||
mov edx,[Window_SizeX]
|
||||
sub edx,25+10+ci_edit_wnd_x_pos
|
||||
sub edx,ci_scroll_dim+5+ci_edit_wnd_x_pos
|
||||
shl ebx,16
|
||||
mov bx,dx ;è¨à¨ ¡®à¤îà
|
||||
|
||||
mov ecx,[WorkScreen_SizeY]
|
||||
add ecx,ci_edit_wnd_y_pos+ci_edit_wnd_border
|
||||
mov edx,[Window_SizeY]
|
||||
sub edx,ecx
|
||||
sub edx,ci_scroll_dim+5+ci_offs_skin_h;ci_edit_wnd_border
|
||||
shl ecx,16
|
||||
mov cx,ci_edit_wnd_border ;¢ëá®â ¡®à¤îà
|
||||
mov cx,dx ;¢ëá®â ¡®à¤îà
|
||||
|
||||
mcall SF_DRAW_RECT,,,0xc7cbcf ;¡®à¤îà ¯®¤ ®ª®¬ ¨ ¤ áªà®««¨£®¬
|
||||
;------------------------------------------------
|
||||
@ -115,29 +122,29 @@ no_znak2:
|
||||
mov eax,ci_edit_wnd_x_pos
|
||||
mov ebx,[Window_SizeY]
|
||||
mov ecx,[Window_SizeX]
|
||||
mov edx,20+10
|
||||
mov edx,ci_scroll_dim
|
||||
mov esi,3
|
||||
sub ecx,35+ci_edit_wnd_x_pos
|
||||
sub ebx,25+10
|
||||
sub ecx,ci_scroll_dim+5+ci_edit_wnd_x_pos+ci_offs_skin_w
|
||||
sub ebx,ci_scroll_dim+5+ci_offs_skin_h
|
||||
call draw_volume_rectangle ; horizontal scrollbar border
|
||||
;------------------------------------------------
|
||||
mov eax,[Window_SizeX]
|
||||
mov ebx,ci_edit_wnd_y_pos
|
||||
mov ecx,20+10
|
||||
mov ecx,ci_scroll_dim
|
||||
mov edx,[Window_SizeY]
|
||||
mov esi,3
|
||||
sub eax,25+10
|
||||
sub edx,35+ci_edit_wnd_y_pos
|
||||
sub eax,ci_scroll_dim+5+ci_offs_skin_w
|
||||
sub edx,ci_scroll_dim+5+ci_edit_wnd_y_pos+ci_offs_skin_h
|
||||
call draw_volume_rectangle ; vertical scrollbar border
|
||||
call draw_scrollers
|
||||
;------------------------------------------------
|
||||
mov eax,[Window_SizeX]
|
||||
mov ebx,[Window_SizeY]
|
||||
mov ecx,20+10
|
||||
mov edx,20+10
|
||||
mov ecx,ci_scroll_dim
|
||||
mov edx,ci_scroll_dim
|
||||
mov esi,6
|
||||
sub eax,25+10
|
||||
sub ebx,25+10
|
||||
sub eax,ci_scroll_dim+5+ci_offs_skin_w
|
||||
sub ebx,ci_scroll_dim+5+ci_offs_skin_h
|
||||
call draw_volume_rectangle ; down and right small area
|
||||
;------------------------------------------------
|
||||
.end:
|
||||
|
@ -78,7 +78,7 @@ print_panel_menu:
|
||||
next_icon_delit1:
|
||||
mov edx,[counter]
|
||||
add edx,11100000000000000000000000000000b
|
||||
mcall 8
|
||||
mcall SF_DEFINE_BUTTON
|
||||
inc [counter]
|
||||
cmp [counter],30
|
||||
jl next_icon_delit1
|
||||
@ -89,7 +89,7 @@ next_icon_delit1:
|
||||
next_icon_delit2:
|
||||
mov edx,[counter]
|
||||
add edx,11100000000000000000000000000000b
|
||||
mcall 8
|
||||
mcall SF_DEFINE_BUTTON
|
||||
inc [counter]
|
||||
cmp [counter],45
|
||||
jl next_icon_delit2
|
||||
@ -100,7 +100,7 @@ next_icon_delit2:
|
||||
next_icon_delit3:
|
||||
mov edx,[counter]
|
||||
add edx,11100000000000000000000000000000b
|
||||
mcall 8
|
||||
mcall SF_DEFINE_BUTTON
|
||||
inc [counter]
|
||||
cmp [counter],50
|
||||
jl next_icon_delit3
|
||||
@ -108,12 +108,12 @@ next_icon_delit3:
|
||||
;delit buttons of palette
|
||||
mov edx,51
|
||||
add edx,11100000000000000000000000000000b
|
||||
mcall 8
|
||||
mcall SF_DEFINE_BUTTON
|
||||
|
||||
;delit buttons of color
|
||||
mov edx,52
|
||||
add edx,11100000000000000000000000000000b
|
||||
mcall 8
|
||||
mcall SF_DEFINE_BUTTON
|
||||
|
||||
pop [counter]
|
||||
|
||||
@ -196,14 +196,14 @@ no_columnus_menu_text:
|
||||
|
||||
|
||||
menu_still:
|
||||
mcall 10
|
||||
mcall 2
|
||||
mcall 17
|
||||
call GetMouseClick
|
||||
test eax,eax
|
||||
jz calculate_counter_menu
|
||||
mcall SF_WAIT_EVENT
|
||||
mcall SF_GET_KEY
|
||||
mcall SF_GET_BUTTON
|
||||
call GetMouseClick
|
||||
test eax,eax
|
||||
jz calculate_counter_menu
|
||||
|
||||
call GetMouseCoordinats
|
||||
call GetMouseCoordinats
|
||||
;calculate menu counter
|
||||
mov eax,[counter]
|
||||
dec eax
|
||||
@ -243,7 +243,7 @@ no_columnus_menu_text2:
|
||||
|
||||
pop edi esi
|
||||
|
||||
mcall 5,15
|
||||
mcall SF_SLEEP,15
|
||||
|
||||
push [counter]
|
||||
pusha
|
||||
@ -300,7 +300,7 @@ PrintMousePos:
|
||||
shl edx,16
|
||||
add edx,20+15+6+6
|
||||
and esi,0
|
||||
mcall 47,<4,0>
|
||||
mcall SF_DRAW_NUMBER,<4,0>
|
||||
|
||||
mov ecx,[ScreenY]
|
||||
add ecx,[PosY]
|
||||
@ -342,10 +342,10 @@ draw_scrollers:
|
||||
mov edi,[CounterX]
|
||||
mov eax,[Scroll1CoordinatX]
|
||||
mov ebx,[Window_SizeY]
|
||||
sub ebx,22+10
|
||||
sub ebx,(ci_scroll_dim-3)+5+ci_offs_skin_h
|
||||
mov ecx,[Window_SizeX]
|
||||
sub ecx,39+ci_scrollh_coord_x_min
|
||||
mov edx,14+10
|
||||
sub ecx,ci_scroll_dim+5+4+ci_scrollh_coord_x_min+ci_offs_skin_w
|
||||
mov edx,ci_scroll_dim-6
|
||||
mov esi,1
|
||||
mov [Scroll1CoordinatY],ebx
|
||||
mov [Scroll1MaxSizeY],edx
|
||||
@ -365,11 +365,11 @@ draw_scrollers:
|
||||
call draw_volume_rectangle ; horizontal scrollbar polzunok
|
||||
|
||||
mov eax,[Window_SizeX]
|
||||
sub eax,22+10
|
||||
sub eax,(ci_scroll_dim-3)+5+ci_offs_skin_w
|
||||
mov ebx,[Scroll2CoordinatY]
|
||||
mov ecx,14+10
|
||||
mov ecx,ci_scroll_dim-6
|
||||
mov edx,[Window_SizeY]
|
||||
sub edx,39+ci_scrollv_coord_y_min
|
||||
sub edx,ci_scroll_dim+5+4+ci_scrollv_coord_y_min+ci_offs_skin_h
|
||||
mov esi,1
|
||||
mov [Scroll2CoordinatX],eax
|
||||
mov [Scroll2MaxSizeX],ecx
|
||||
|
Loading…
Reference in New Issue
Block a user