Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
6920 leency 1
struct struct_pixie_colors {
7182 leency 2
	dword color_top_panel_bg,
3
	      color_top_panel_folder_name,
7166 leency 4
	      color_top_panel_song_name,
6920 leency 5
		  color_list_bg,
6
	      color_list_text,
7
	      color_list_active_bg,
8
	      color_list_active_text,
9
	      color_list_active_pointer,
10
	      color_list_scroller,
11
		  color_list_border;
12
} theme;
13
 
7182 leency 14
_ini ini = { "/sys/media/pixie/pixie.ini", "Config" };
6920 leency 15
 
7166 leency 16
#define WIN_W_SMALL 114
17
#define WIN_H_SMALL 31
18
 
6920 leency 19
void LoadIniConfig()
20
{
7182 leency 21
	window_mode   = ini.GetInt("window_mode", WINDOW_MODE_NORMAL);
22
	win_x_normal  = ini.GetInt("win_x_normal", 100);
23
	win_y_normal  = ini.GetInt("win_y_normal", 90);
24
	win_x_small   = ini.GetInt("win_x_small", -1);
25
	win_y_small   = ini.GetInt("win_y_small", -1);
26
	ini.GetString("last_folder", #work_folder, sizeof(work_folder), 0);
6920 leency 27
 
28
	Libimg_LoadImage(#skin, abspath("skin.png"));
29
	skin.w = 322;
7182 leency 30
	theme.color_top_panel_bg = 0x242424;
7166 leency 31
	theme.color_top_panel_folder_name = 0xDDDDDB;
32
	theme.color_top_panel_song_name = 0xBEBEBE;
7182 leency 33
	theme.color_list_bg = 0x313031;
34
	theme.color_list_text = 0xADAEAD;
35
	theme.color_list_active_bg = 0x434343;
36
	theme.color_list_active_text = 0x17A2CC;
37
	theme.color_list_active_pointer = 0xD6D6D6;
6920 leency 38
	theme.color_list_scroller = 0xBBBbbb;
7182 leency 39
	theme.color_list_border = 0x121212;
6920 leency 40
	scroll1.bckg_col = theme.color_list_bg;
41
	scroll1.frnt_col = theme.color_list_border;
42
	scroll1.line_col = theme.color_list_border;
43
 
44
	if (win_x_small==-1) win_x_small = 2000;
45
	if (win_y_small==-1) win_y_small = GetClientHeight() - WIN_H_SMALL + 1;
46
 
47
}
48
 
49
void SaveIniConfig()
50
{
51
	if (window_mode == WINDOW_MODE_NORMAL)
52
	{
53
		win_x_normal = Form.left;
54
		win_y_normal = Form.top;
55
	}
56
	if (window_mode == WINDOW_MODE_SMALL)
57
	{
58
		win_x_small = Form.left;
59
		win_y_small = Form.top;
60
	}
7182 leency 61
	ini.SetInt("window_mode", window_mode);
62
	ini.SetInt("win_x_normal", win_x_normal);
63
	ini.SetInt("win_y_normal", win_y_normal);
64
	ini.SetInt("win_x_small", win_x_small);
65
	ini.SetInt("win_y_small", win_y_small);
66
	ini.SetString("last_folder", #work_folder, strlen(#work_folder));
6920 leency 67
}
68