Subversion Repositories Kolibri OS

Rev

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

Rev 8946 Rev 9434
Line 263... Line 263...
263
}
263
}
Line 264... Line 264...
264
 
264
 
265
void DrawTopPanel()
265
void DrawTopPanel()
266
{
266
{
267
	int kfont_width;
-
 
268
	int button_y;
267
	int kfont_width;
269
	//Mode depended
268
	//Mode depended
270
	if (window_mode == WINDOW_MODE_NORMAL)
269
	if (window_mode == WINDOW_MODE_NORMAL)
271
	{
270
	{
272
		button_y = 46;
271
		#define BIGBUTTON_Y 46
273
		img_draw stdcall(skin.image, 0, 0, skin.w, skin.h, 0, 0);
272
		img_draw stdcall(skin.image, 0, 0, skin.w, skin.h, 0, 0);
274
		if (playback_mode != PLAYBACK_MODE_STOPED) 
273
		if (playback_mode != PLAYBACK_MODE_STOPED) 
275
			img_draw stdcall(skin.image, 47, button_y, 41, 21, skin.w+1, WIN_H_SMALL+1);
274
			img_draw stdcall(skin.image, 47, BIGBUTTON_Y, 41, 21, skin.w+1, WIN_H_SMALL+1);
276
		if (repeat) 
275
		if (repeat) 
277
			img_draw stdcall(skin.image, 217, button_y+2, 17,17,skin.w+43, WIN_H_SMALL+1);
276
			img_draw stdcall(skin.image, 189, BIGBUTTON_Y+5, 14,14,skin.w+44, WIN_H_SMALL+3);
278
		if (shuffle) 
277
		if (shuffle) 
Line 279... Line 278...
279
			img_draw stdcall(skin.image, 236, button_y+2, 17,17, skin.w+62, WIN_H_SMALL+1);
278
			img_draw stdcall(skin.image, 212, BIGBUTTON_Y+5, 14,14, skin.w+59, WIN_H_SMALL+3);
280
 
279
 
281
		if (!work_folder) DrawPixieTitle("Pixie");
280
		if (!work_folder) DrawPixieTitle("Pixie");
282
		else DrawPixieTitle(#work_folder + strrchr(#work_folder, '/'));
281
		else DrawPixieTitle(#work_folder + strrchr(#work_folder, '/'));
283
		kfont_width = kfont.WriteIntoWindow(8, 24, theme.color_top_panel_bg, 
282
		kfont_width = kfont.WriteIntoWindow(8, 24, theme.color_top_panel_bg, 
284
			theme.color_top_panel_song_name, list.font_type, #current_filename);
283
			theme.color_top_panel_song_name, list.font_type, #current_filename);
285
		if (kfont_width>skin.w-15) DrawBar(skin.w-1, 24, 1, list.item_h, theme.color_list_border);
284
		if (kfont_width>skin.w-15) DrawBar(skin.w-1, 24, 1, list.item_h, theme.color_list_border);
286
	 	//Playing control buttons
285
	 	//Playing control buttons
287
		DefineHiddenButton(7, button_y, 38, 20, BUTTON_PLAYBACK_PREV);
286
		DefineHiddenButton(7, BIGBUTTON_Y, 38, 20, BUTTON_PLAYBACK_PREV);
288
		DefineHiddenButton(48, button_y, 38, 20, BUTTON_PLAYBACK_PLAY_PAUSE);
287
		DefineHiddenButton(48, BIGBUTTON_Y, 38, 20, BUTTON_PLAYBACK_PLAY_PAUSE);
289
		DefineHiddenButton(87, button_y, 38, 20, BUTTON_PLAYBACK_NEXT);
288
		DefineHiddenButton(87, BIGBUTTON_Y, 38, 20, BUTTON_PLAYBACK_NEXT);
290
		//Window control buttons
289
		//Window control buttons
291
		DefineHiddenButton(Form.width - 27, 1, 26, 15, BUTTON_WINDOW_CLOSE);
290
		DefineHiddenButton(Form.width - 27, 1, 26, 15, BUTTON_WINDOW_CLOSE);
292
		DefineHiddenButton(Form.width - 55, 1, 26, 15, BUTTON_WINDOW_MINIMIZE);
291
		DefineHiddenButton(Form.width - 55, 1, 26, 15, BUTTON_WINDOW_MINIMIZE);
293
		DefineHiddenButton(Form.width - 83, 1, 26, 15, BUTTON_WINDOW_REDUCE);
292
		DefineHiddenButton(Form.width - 83, 1, 26, 15, BUTTON_WINDOW_REDUCE);
294
		//Other buttons
293
		//Other buttons
295
		DefineHiddenButton(218, button_y+3, 17, 16, BUTTON_REPEAT);
294
		DefineHiddenButton(185, BIGBUTTON_Y+3, 22, 16, BUTTON_REPEAT);
296
		DefineHiddenButton(237, button_y+3, 17, 16, BUTTON_SHUFFLE);
295
		DefineHiddenButton(208, BIGBUTTON_Y+3, 22, 16, BUTTON_SHUFFLE);
297
		DefineHiddenButton(270, button_y+3, 17, 16, BUTTON_OPEN_DIALOG);
296
		DefineHiddenButton(259, BIGBUTTON_Y+3, 18, 16, BUTTON_OPEN_DIALOG);
298
		DefineHiddenButton(289, button_y+3, 17, 16, BUTTON_SHOW_VOLUME);
297
		DefineHiddenButton(289, BIGBUTTON_Y+3, 18, 16, BUTTON_SHOW_VOLUME);
299
	}
298
	}
300
	else if (window_mode == WINDOW_MODE_SMALL)
299
	else if (window_mode == WINDOW_MODE_SMALL)
301
	{
300
	{
302
		button_y = 7;
301
		#define SMBUTTON_Y 7
303
		img_draw stdcall(skin.image, 0, 0, WIN_W_SMALL, WIN_H_SMALL, skin.w-1, 0);
302
		img_draw stdcall(skin.image, 0, 0, WIN_W_SMALL, WIN_H_SMALL, skin.w-1, 0);
304
		if (playback_mode != PLAYBACK_MODE_STOPED) 
303
		if (playback_mode != PLAYBACK_MODE_STOPED) 
305
			img_draw stdcall(skin.image, 46, button_y-1, 27, 19, skin.w+83, WIN_H_SMALL+1);
304
			img_draw stdcall(skin.image, 46, SMBUTTON_Y-1, 27, 19, skin.w+83, WIN_H_SMALL+1);
306
		DefineHiddenButton(0, 0, WIN_W_SMALL, WIN_H_SMALL, 99 + BT_NOFRAME);
305
		DefineHiddenButton(0, 0, WIN_W_SMALL, WIN_H_SMALL, 99 + BT_NOFRAME);
307
	 	//Playing control buttons
306
	 	//Playing control buttons
308
		DefineHiddenButton(20, button_y, 24, 16, BUTTON_PLAYBACK_PREV);
307
		DefineHiddenButton(20, SMBUTTON_Y, 24, 16, BUTTON_PLAYBACK_PREV);
309
		DefineHiddenButton(46, button_y, 24, 16, BUTTON_PLAYBACK_PLAY_PAUSE);
308
		DefineHiddenButton(46, SMBUTTON_Y, 24, 16, BUTTON_PLAYBACK_PLAY_PAUSE);
310
		DefineHiddenButton(72, button_y, 24, 16, BUTTON_PLAYBACK_NEXT);
309
		DefineHiddenButton(72, SMBUTTON_Y, 24, 16, BUTTON_PLAYBACK_NEXT);
311
		//Window control buttons
310
		//Window control buttons
312
		DefineHiddenButton(Form.width - 20, 1, 19, 13, BUTTON_WINDOW_CLOSE);
311
		DefineHiddenButton(Form.width - 20, 1, 19, 13, BUTTON_WINDOW_CLOSE);
313
		DefineHiddenButton(Form.width - 20, 16, 19, 13, BUTTON_WINDOW_REDUCE);
312
		DefineHiddenButton(Form.width - 20, 16, 19, 13, BUTTON_WINDOW_REDUCE);