Subversion Repositories Kolibri OS

Rev

Rev 7630 | 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
 
7197 leency 14
_ini ini;
6920 leency 15
 
7189 leency 16
#define WIN_W_SMALL 126
7166 leency 17
#define WIN_H_SMALL 31
18
 
6920 leency 19
void LoadIniConfig()
20
{
7429 leency 21
	ini.path = GetIni(#pixie_ini_path, "app.ini");
22
	ini.section = "Pixie";
7182 leency 23
	window_mode   = ini.GetInt("window_mode", WINDOW_MODE_NORMAL);
24
	win_x_normal  = ini.GetInt("win_x_normal", 100);
25
	win_y_normal  = ini.GetInt("win_y_normal", 90);
26
	win_x_small   = ini.GetInt("win_x_small", -1);
27
	win_y_small   = ini.GetInt("win_y_small", -1);
7192 leency 28
	ini.GetString("last_folder", #work_folder, sizeof(work_folder), NULL);
6920 leency 29
 
7977 leency 30
	skin.load(abspath("pixieskn.png"));
6920 leency 31
	skin.w = 322;
7182 leency 32
	theme.color_top_panel_bg = 0x242424;
7183 leency 33
	theme.color_top_panel_folder_name = 0xEEEeee;
7166 leency 34
	theme.color_top_panel_song_name = 0xBEBEBE;
7182 leency 35
	theme.color_list_bg = 0x313031;
36
	theme.color_list_text = 0xADAEAD;
37
	theme.color_list_active_bg = 0x434343;
38
	theme.color_list_active_text = 0x17A2CC;
39
	theme.color_list_active_pointer = 0xD6D6D6;
6920 leency 40
	theme.color_list_scroller = 0xBBBbbb;
7182 leency 41
	theme.color_list_border = 0x121212;
6920 leency 42
	scroll1.bckg_col = theme.color_list_bg;
43
	scroll1.frnt_col = theme.color_list_border;
44
	scroll1.line_col = theme.color_list_border;
45
 
46
	if (win_x_small==-1) win_x_small = 2000;
47
	if (win_y_small==-1) win_y_small = GetClientHeight() - WIN_H_SMALL + 1;
48
 
49
}
50
 
51
void SaveIniConfig()
52
{
53
	if (window_mode == WINDOW_MODE_NORMAL)
54
	{
55
		win_x_normal = Form.left;
56
		win_y_normal = Form.top;
57
	}
58
	if (window_mode == WINDOW_MODE_SMALL)
59
	{
60
		win_x_small = Form.left;
61
		win_y_small = Form.top;
62
	}
7182 leency 63
	ini.SetInt("window_mode", window_mode);
64
	ini.SetInt("win_x_normal", win_x_normal);
65
	ini.SetInt("win_y_normal", win_y_normal);
66
	ini.SetInt("win_x_small", win_x_small);
67
	ini.SetInt("win_y_small", win_y_small);
68
	ini.SetString("last_folder", #work_folder, strlen(#work_folder));
6920 leency 69
}
70