Subversion Repositories Kolibri OS

Rev

Rev 8944 | Rev 9439 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8944 Rev 8949
Line 51... Line 51...
51
}
51
}
Line 52... Line 52...
52
 
52
 
53
:void DrawWideRectangle(dword x,y,w,h,boder,color1)
53
:void DrawWideRectangle(dword x,y,w,h,boder,color1)
54
{
54
{
55
	DrawBar(x, y, w, boder, color1);
55
	DrawBar(x, y, w, boder, color1);
56
	DrawBar(x, y+h-boder, w, boder, color1);
56
	DrawBar(x, y+h-boder, w, boder, EDX);
57
	DrawBar(x, y+boder, boder, h-boder-boder, color1);
57
	DrawBar(x, y+boder, boder, h-boder-boder, EDX);
58
	DrawBar(x+w-boder, y+boder, boder, h-boder-boder, color1);
58
	DrawBar(x+w-boder, y+boder, boder, h-boder-boder, EDX);
Line 59... Line 59...
59
}
59
}
60
 
60
 
61
:void DrawRectangle3D(dword x,y,w,h,color1,color2)
61
:void DrawRectangle3D(dword x,y,w,h,color1,color2)
62
{
62
{
63
	DrawBar(x,y,w+1,1,color1);
63
	DrawBar(x,y,w+1,1,color1);
64
	DrawBar(x,y+1,1,h-1,color1);
64
	DrawBar(x,y+1,1,h-1,EDX);
65
	DrawBar(x+w,y+1,1,h,color2);
65
	DrawBar(x+w,y+1,1,h,color2);
Line 66... Line 66...
66
	DrawBar(x,y+h,w,1,color2);
66
	DrawBar(x,y+h,w,1,EDX);
67
}
67
}
68
 
68
 
Line 218... Line 218...
218
 
218
 
219
:void DrawPopup(dword x,y,w,h,skinned, col_work,col_border)
219
:void DrawPopup(dword x,y,w,h,skinned, col_work,col_border)
220
{
220
{
221
	DrawRectangle(x,y,w,h,col_border);
221
	DrawRectangle(x,y,w,h,col_border);
222
	DrawBar(x+1,y+1,w-1,1,0xFFFfff);
222
	DrawBar(x+1,y+1,w-1,1,0xFFFfff);
223
	DrawBar(x+1,y+2,1,h-2,0xFFFfff);
223
	DrawBar(x+1,y+2,1,h-2,EDX);
224
	if (col_work!=-1) DrawBar(x+2,y+2,w-2,h-2,col_work);
224
	if (col_work!=-1) DrawBar(x+2,y+2,w-2,h-2,col_work);
225
	DrawPopupShadow(x,y,w,h-1,skinned);
225
	DrawPopupShadow(x,y,w,h-1,skinned);
Line 226... Line 226...
226
}
226
}
Line 287... Line 287...
287
	DrawBar(x+1,    y+h+1, w, 1,   dark);
287
	DrawBar(x+1,    y+h+1, w, 1,   dark);
288
	DrawBar(x,      y+1,   1, h-1, light);
288
	DrawBar(x,      y+1,   1, h-1, light);
289
	DrawBar(x+w+1,  y+2,   1, h-2, right);
289
	DrawBar(x+w+1,  y+2,   1, h-2, right);
Line 290... Line 290...
290
 
290
 
291
	PutPixel(x,     y,     dots);
291
	PutPixel(x,     y,     dots);
292
	PutPixel(x+w+1, y+h+1, dots);
292
	PutPixel(x+w+1, y+h+1, EDX);
293
	PutPixel(x,     y+h+1, dots);
293
	PutPixel(x,     y+h+1, EDX);
Line 294... Line 294...
294
	PutPixel(x+w+1, y,     dots);
294
	PutPixel(x+w+1, y,     EDX);
295
	
295
	
296
	PutPixel(x,     y+h, dark);
296
	PutPixel(x,     y+h, dark);
297
	PutPixel(x+w+1, y+1, light);
297
	PutPixel(x+w+1, y+1, light);
Line 298... Line 298...
298
	PutPixel(x+w+1, y+h, dark);	
298
	PutPixel(x+w+1, y+h, dark);	
299
}
299
}
300
 
-
 
301
:bool skin_is_dark()
300
 
Line 302... Line 301...
302
{
301
:bool skin_is_dark()
303
	dword gray;
302
{
304
	dword color_image = #sc.work;
303
	ESI = #sc.work;
305
 
-
 
Line 306... Line 304...
306
	gray = DSBYTE[color_image]*DSBYTE[color_image];
304
 
307
	gray += DSBYTE[color_image+1]*DSBYTE[color_image+1];
305
	EDI = DSBYTE[ESI]*DSBYTE[ESI];
308
	gray += DSBYTE[color_image+2]*DSBYTE[color_image+2];
306
	EDI += DSBYTE[ESI+1]*DSBYTE[ESI+1];
309
	gray = sqrt(gray) / 3;
307
	EDI += DSBYTE[ESI+2]*DSBYTE[ESI+2];
310
 
308
 
311
	if (gray < 65) {
309
	if (sqrt(EDI) / 3 < 65) {