Subversion Repositories Kolibri OS

Rev

Rev 8947 | Rev 8951 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4042 leency 1
 
8947 leency 2
	dword i;
5532 leency 3
4
 
7637 leency 5
	dword sc_y = files.y;
6
	dword sc_h = files.h - 16;
7
	dword sc_slider_y;
8
	dword sc_center;
9
5532 leency 10
 
4042 leency 11
	{
12
		sc_slider_y = sc_y - 1;
8764 leency 13
		sc_slider_h = sc_h + 1;
14
	} else {
8949 leency 15
		sc_slider_y = files.first * sc_h / files.count + sc_y - 1;
8764 leency 16
		sc_slider_h = sc_h * files.visible - files.visible / files.count + 2;
17
		if (sc_slider_h < 20) {
8949 leency 18
			sc_slider_h = 20; //set minimal scroll height
19
		}
20
		if (sc_slider_h > sc_h-sc_slider_y+56) || (files.first+files.visible>=files.count) {
21
			sc_slider_y= sc_y + sc_h - sc_slider_h; //fix for the very long list
22
		}
23
	}
4042 leency 24
	//slider
5532 leency 25
	DrawRectangle(sc_x,sc_slider_y,16,sc_slider_h,sc.work_graph);
7806 leency 26
	DrawRectangle3D(sc_x+1,sc_slider_y+1,14,sc_slider_h-2, sc.work_light , sc.work_dark);
27
	for (i=0; i<13; i++) {
8947 leency 28
		if (!_scroll_used) EDX = col.work_gradient[13-i]; else EDX = col.work_gradient[i];
29
		DrawBar(sc_x + 2 + i, sc_slider_y+2, 1, sc_slider_h-3, EDX);
30
	}
31
7637 leency 32
 
33
34
 
7806 leency 35
	DrawBar(sc_x+4+1, sc_center-2, 8,  1, sc.work_light);
36
7637 leency 37
 
7806 leency 38
	DrawBar(sc_x+3+1, sc_center+1, 10, 1, sc.work_light);
39
7637 leency 40
 
7806 leency 41
	DrawBar(sc_x+4+1, sc_center+4, 8,  1, sc.work_light);
42
7637 leency 43
 
5532 leency 44
	if (sc_slider_y > sc_y + 1)
45
	{
46
		DrawBar(sc_x+1, sc_y,   15, 1, col.slider_bg_left);
7634 leency 47
		DrawBar(sc_x+1, sc_y+1,  1, sc_slider_y-sc_y-1, col.slider_bg_left);
48
		DrawBar(sc_x+2, sc_y+1, 14, sc_slider_y-sc_y-1, col.slider_bg_big);
49
	}
5532 leency 50
	//area after slider
51
	if (sc_h-sc_slider_h+sc_y-2>sc_slider_y)
5703 leency 52
	{
5532 leency 53
		DrawBar(sc_x+1, sc_slider_y + sc_slider_h+1, 15, 1, col.slider_bg_left);
7634 leency 54
		DrawBar(sc_x+1, sc_slider_y + sc_slider_h+2,  1, sc_h-sc_slider_h-sc_slider_y+sc_y-2, col.slider_bg_left);
55
		DrawBar(sc_x+2, sc_slider_y + sc_slider_h+2, 14, sc_h-sc_slider_h-sc_slider_y+sc_y-2, col.slider_bg_big);
56
	}
5532 leency 57
}
4042 leency 58
59
 
6678 leency 60
{
4042 leency 61
	DrawRectangle(x,y,width,height,sc.work_graph);
7806 leency 62
	DrawRectangle3D(x+1,y+1,width-2,height-2, sc.work_light, sc.work_dark);
63
	PutPixel(x+width-1, y+1, sc.work_dark);
64
	DrawFilledBar(x+2, y+2, width-3, height-3);
6050 leency 65
	if (id) DefineHiddenButton(x+1,y+1,width-2,height-2,id);
7462 leency 66
	WriteText(-strlen(text)*6+width/2+x+1,height/2+y-3,0x80,sc.work_text,text);
7806 leency 67
}
4042 leency 68
69
 
8927 leency 70
{
8895 leency 71
	#define FW 12
8927 leency 72
	#define FH 16
8895 leency 73
	int numw = calc(number/10)*6+FW;
8927 leency 74
	if (skin_is_dark()) {
8895 leency 75
		DrawFlatButtonSmall(x,y,width,FH,id,text);
76
		return;
77
	}
78
	DrawRectangle(x,y,width,FH,sc.work_graph);
79
	DrawRectangle3D(x+1,y+1,width-2,FH-2, 0x97D194, 0x00A100);
8927 leency 80
	PutPixel(x+width-1, y+1, sc.work_dark);
8895 leency 81
	DrawBar(x+2, y+2, numw, FH-2, 0x6060FF);
8927 leency 82
	WriteText(x+6,FH/2+y-2,0x80,0x444444,itoa(number));
83
	$sub ebx, 1 <<16 + 1
84
	$add ecx, 0xFFFfff-0x444444
85
	$int 64
86
	DrawBar(x+2+numw, y+2, width-3-numw, FH-3, 0x00AA00);
87
	DefineHiddenButton(x+1,y+1,width-2,FH-2,id);
8895 leency 88
	WriteText(-strlen(text)*6+width/2+x+8,FH/2+y-2,0x80,0x444444,text);
8927 leency 89
	$sub ebx, 1 <<16 + 1
8895 leency 90
	$add ecx, 0xFFFfff-0x444444
91
	$int 64
92
}
93
94
 
4042 leency 95
{ int i; for (i=0; i
7804 leency 96
4225 punk_joker 97
 
6008 leency 98
{
4225 punk_joker 99
	#define POPIN_W 260
8895 leency 100
	int popin_x = files.w - POPIN_W / 2 + files.x ;
101
	DrawPopup(popin_x, 160, POPIN_W, 95, 1, sc.work, sc.work_graph);
102
	DrawCaptButton(popin_x+23+000, 215, 100, 26, POPUP_BTN1, sc.button, sc.button_text, b1_text);
8764 leency 103
	DrawCaptButton(popin_x+23+114, 215, 100, 26, POPUP_BTN2, sc.button, sc.button_text, b2_text);
104
}
7462 leency 105
106
 
107
	dword col_pxl = MixColors(sc.work_graph, sc.work, 60);
7806 leency 108
	DrawBar(x+1,y,2,4,sc.work_graph);
109
	DrawBar(x,y+1,4,2,sc.work_graph);
110
	PutPixel(x,y,col_pxl);
7462 leency 111
	PutPixel(x+3,y,col_pxl);
112
	PutPixel(x,y+3,col_pxl);
113
	PutPixel(x+3,y+3,col_pxl);
114
}
7491 leency 115
>