Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
5465 leency 1
void LoadIniConfig()
2
{
5509 leency 3
	ini_get_int stdcall (#pixie_ini_path, "Config", "current_theme", THEME_DARK); current_theme = EAX;
4
	ini_get_int stdcall (#pixie_ini_path, "Config", "window_mode", WINDOW_MODE_NORMAL); window_mode = EAX;
5
	ini_get_int stdcall (#pixie_ini_path, "Config", "win_x_normal", 100); win_x_normal = EAX;
6
	ini_get_int stdcall (#pixie_ini_path, "Config", "win_y_normal", 90); win_y_normal = EAX;
7
	ini_get_int stdcall (#pixie_ini_path, "Config", "win_x_small", -1); win_x_small = EAX;
8
	ini_get_int stdcall (#pixie_ini_path, "Config", "win_y_small", -1); win_y_small = EAX;
9
	ini_get_str stdcall (#pixie_ini_path, "Config", "last_folder", #work_folder, sizeof(work_folder), 0);
10
 
5465 leency 11
	if (current_theme == THEME_DARK) SetColorThemeDark(); else SetColorThemeLight();
5509 leency 12
	if (win_x_small==-1) win_x_small = 2000;
13
	if (win_y_small==-1) win_y_small = GetClientHeight() - skin.h + 1;
5465 leency 14
}
15
 
16
void SaveIniConfig()
17
{
5509 leency 18
	if (window_mode == WINDOW_MODE_NORMAL)
19
	{
20
		win_x_normal = Form.left;
21
		win_y_normal = Form.top;
22
	}
23
	if (window_mode == WINDOW_MODE_SMALL)
24
	{
25
		win_x_small = Form.left;
26
		win_y_small = Form.top;
27
	}
5465 leency 28
	ini_set_int stdcall (#pixie_ini_path, "Config", "current_theme", current_theme);
29
	ini_set_int stdcall (#pixie_ini_path, "Config", "window_mode", window_mode);
5509 leency 30
	ini_set_int stdcall (#pixie_ini_path, "Config", "win_x_normal", win_x_normal);
31
	ini_set_int stdcall (#pixie_ini_path, "Config", "win_y_normal", win_y_normal);
32
	ini_set_int stdcall (#pixie_ini_path, "Config", "win_x_small", win_x_small);
33
	ini_set_int stdcall (#pixie_ini_path, "Config", "win_y_small", win_y_small);
5465 leency 34
	ini_set_str stdcall (#pixie_ini_path, "Config", "last_folder", #work_folder, strlen(#work_folder));
35
}
36
 
37
struct struct_pixie_colors {
38
	dword color_top_panel_text,
39
		  color_list_bg,
40
	      color_list_text,
41
	      color_list_active_bg,
42
	      color_list_active_text,
43
	      color_list_active_pointer,
44
	      color_list_scroller,
45
		  color_list_border;
46
} theme;
47
 
48
 
49
void SetColorThemeDark()
50
{
51
	current_theme = THEME_DARK;
5468 leency 52
	Libimg_LoadImage(#skin, abspath("s_dark.png"));
5465 leency 53
	skin.w = 300;
54
	theme.color_top_panel_text = 0xFCFFBE;
55
	theme.color_list_bg = 0x313031;
56
	theme.color_list_text = 0xADAEAD;
57
	theme.color_list_active_bg = 0x434343;
58
	theme.color_list_active_text = 0xADAEAD;
59
	theme.color_list_active_pointer = 0xD6D6D6;
60
	theme.color_list_scroller = 0xBBBbbb;
61
	theme.color_list_border = 0x121212;
62
	scroll1.bckg_col = theme.color_list_bg;
63
	scroll1.frnt_col = theme.color_list_border;
64
	scroll1.line_col = theme.color_list_border;
65
	DrawWindow();
66
}
67
 
68
 
69
void SetColorThemeLight()
70
{
71
	current_theme = THEME_LIGHT;
5468 leency 72
	Libimg_LoadImage(#skin, abspath("s_light.png"));
5465 leency 73
	skin.w = 300;
74
	theme.color_top_panel_text = 0x85663F;
75
	theme.color_list_bg = 0xE2E2E2;
76
	theme.color_list_text = 0x595959;
77
	theme.color_list_active_bg = 0xFAF3AF;
78
	theme.color_list_active_text = 0x85663F;
79
	theme.color_list_active_pointer = 0x85663F;
80
	theme.color_list_scroller = 0xBBBbbb;
81
	theme.color_list_border = 0x736D65;
82
	scroll1.bckg_col = theme.color_list_bg;
83
	scroll1.frnt_col = theme.color_list_border;
84
	scroll1.line_col = theme.color_list_border;
85
	DrawWindow();
86
}