Subversion Repositories Kolibri OS

Rev

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

Rev 5985 Rev 5987
Line 56... Line 56...
56
 
56
 
57
 
57
 
58
void main()
58
void main()
59
{   
59
{   
60
	dword id, key;
-
 
61
	font.load("/sys/fonts/Tahoma.kf");
60
	dword id, key;
62
	font.smooth = true;
61
	label.init("/sys/fonts/Tahoma.kf");
63
	load_dll(libio,  #libio_init,1);
62
	load_dll(libio,  #libio_init,1);
Line 64... Line 63...
64
	load_dll(libimg, #libimg_init,1);
63
	load_dll(libimg, #libimg_init,1);
Line 144... Line 143...
144
	tmp = cell_w/2;
143
	tmp = cell_w/2;
Line 145... Line 144...
145
 
144
 
146
	icon_char_pos = strchr(key_value, ',');
145
	icon_char_pos = strchr(key_value, ',');
147
	if (icon_char_pos) icon_id = atoi(icon_char_pos+1); else icon_id = default_icon;
146
	if (icon_char_pos) icon_id = atoi(icon_char_pos+1); else icon_id = default_icon;
148
	img_draw stdcall(skin.image, col*cell_w+tmp-10, row*cell_h+5 + list_pos, 32, 32, 0, icon_id*32);
-
 
149
	//WriteTextCenter(col*cell_w+7,row*cell_h+47 + list_pos,cell_w,0xDCDCDC,key_name);
-
 
150
	//WriteTextCenter(col*cell_w+6,row*cell_h+46 + list_pos,cell_w,0x000000,key_name);
-
 
151
	font.size = 12;
-
 
152
	font.color = 0xDCDCDC;
147
	img_draw stdcall(skin.image, col*cell_w+tmp-10, row*cell_h+5 + list_pos, 32, 32, 0, icon_id*32);
153
	font.bold = false;
-
 
154
	font.bg_color = LIST_BACKGROUND_COLOR;
148
	label.bold = false;
155
	font.write_center(col*cell_w+7,row*cell_h+47 + list_pos,cell_w,0,key_name);
-
 
156
	font.color = 0;
149
	label.write_center(col*cell_w+7,row*cell_h+47 + list_pos, cell_w,0, LIST_BACKGROUND_COLOR, 0xDCDCDC, 12, key_name);
157
	font.write_center(col*cell_w+6,row*cell_h+46 + list_pos,cell_w,0,key_name);
150
	label.write_center(col*cell_w+6,row*cell_h+46 + list_pos, cell_w,0, LIST_BACKGROUND_COLOR, 0x000000, 12, key_name);
158
	current_item_id++;
151
	current_item_id++;
159
	col++;
152
	col++;
160
	return true;
153
	return true;
Line 182... Line 175...
182
		}
175
		}
183
		col = 0;
176
		col = 0;
184
		old_row = row;
177
		old_row = row;
185
		DrawBar(0, row * cell_h + list_pos, Form.cwidth , 29, LIST_BACKGROUND_COLOR);
178
		DrawBar(0, row * cell_h + list_pos, Form.cwidth , 29, LIST_BACKGROUND_COLOR);
186
		//WriteTextB(10, row * cell_h + 9 + list_pos, 0x90, 0x000000, sec_name);
179
		//WriteTextB(10, row * cell_h + 9 + list_pos, 0x90, 0x000000, sec_name);
187
		font.size=15;
-
 
188
		font.bold=false;
180
		label.bold=false;
189
		font.bg_color = LIST_BACKGROUND_COLOR;
-
 
190
		text_len = font.write(10, row * cell_h + 10 + list_pos,sec_name);
181
		text_len = label.write(10, row * cell_h + 10 + list_pos, LIST_BACKGROUND_COLOR, 0, 15, sec_name);
191
		DrawBar(text_len+20, row * cell_h + list_pos + 20, Form.cwidth-text_len-20, 1, 0xDCDCDC);
182
		DrawBar(text_len+20, row * cell_h + list_pos + 20, Form.cwidth-text_len-20, 1, 0xDCDCDC);
192
		DrawBar(text_len+20, row * cell_h + list_pos + 21, Form.cwidth-text_len-20, 1, 0xFCFCFC);
183
		DrawBar(text_len+20, row * cell_h + list_pos + 21, Form.cwidth-text_len-20, 1, 0xFCFCFC);
193
		list_pos += 29;
184
		list_pos += 29;
194
		ini_enum_keys stdcall (f_name, sec_name, #draw_icons_from_section);
185
		ini_enum_keys stdcall (f_name, sec_name, #draw_icons_from_section);
195
	}
186
	}
Line 199... Line 190...
199
void draw_top_bar()
190
void draw_top_bar()
200
{
191
{
201
	int top_position = 26;
192
	int top_position = 26;
202
	DrawBar(0,0,Form.cwidth, top_position-1, system.color.work);
193
	DrawBar(0,0,Form.cwidth, top_position-1, system.color.work);
203
	DrawBar(0,top_position-1, Form.cwidth, 1, system.color.work_graph);
194
	DrawBar(0,top_position-1, Form.cwidth, 1, system.color.work_graph);
204
	font.size = 17;
-
 
205
	font.bold = false;
195
	label.bold = false;
206
	font.bg_color = system.color.work;
-
 
207
	font.write(Form.cwidth-font.getsize(#window_title)/2,0,#window_title);
196
	label.write_center(0,0, Form.cwidth, top_position, system.color.work, system.color.work_text, 17, #window_title);
208
	list_top = top_position;
197
	list_top = top_position;
209
	list_pos = list_top;
198
	list_pos = list_top;
210
	row = -1;
199
	row = -1;
211
}
200
}