Rev 8847 | Rev 8868 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8847 | Rev 8854 | ||
---|---|---|---|
1 | #ifdef LANG_RUS |
1 | #ifdef LANG_RUS |
2 | ?define TITLE_SETT " áâனª¨" |
2 | ?define TITLE_SETT " áâனª¨" |
3 | ?define SHOW_DEVICE_CLASS "뢮¤¨âì §¢ ¨ï ª« áá ãáâனáâ¢" |
3 | ?define SHOW_DEVICE_CLASS "뢮¤¨âì §¢ ¨ï ª« áá ãáâனáâ¢" |
4 | ?define SHOW_STATUS_BAR "®ª §ë¢ âì áâ âãá ¡ à" |
4 | ?define SHOW_STATUS_BAR "®ª §ë¢ âì áâ âãá ¡ à" |
5 | ?define SHOW_BREADCRUMBS "ᯮ«ì§®¢ âì 'å«¥¡ë¥ ªà®èª¨'" |
5 | ?define SHOW_BREADCRUMBS "ᯮ«ì§®¢ âì 'å«¥¡ë¥ ªà®èª¨'" |
6 | ?define BIG_ICONS "ᯮ«ì§®¢ âì ¡®«ì訥 ¨ª®ª¨" |
6 | ?define BIG_ICONS "ᯮ«ì§®¢ âì ¡®«ì訥 ¨ª®ª¨" |
7 | ?define USE_TWO_PANELS "¢¥ ¯ ¥«¨" |
7 | ?define COLORED_LINES "®¤á¢¥ç¨¢ âì ç¥âë¥ «¨¨¨ ¢ ᯨ᪥" |
8 | ?define COLORED_LINES "®¤á¢¥ç¨¢ âì ç¥âë¥ «¨¨¨ ¢ ᯨ᪥" |
- | |
9 | ?define FONT_SIZE_LABEL " §¬¥à èà¨äâ " |
8 | ?define FONT_SIZE_LABEL " §¬¥à èà¨äâ " |
10 | ?define LIST_LINE_HEIGHT "ëá®â áâப¨ ¢ ᯨ᪥" |
9 | ?define LIST_LINE_HEIGHT "ëá®â áâப¨ ¢ ᯨ᪥" |
11 | ?define SAVE_PATH_AS_DEFAULT "¥ªã騩 ¯ãâì" |
10 | ?define SAVE_PATH_AS_DEFAULT "¥ªã騩 ¯ãâì" |
12 | ?define SAVE_START_PATH_AS_DEFAULT "¢¥¤¥ë© ¯ãâì" |
11 | ?define SAVE_START_PATH_AS_DEFAULT "¢¥¤¥ë© ¯ãâì" |
13 | ?define EDIT_FILE_ASSOCIATIONS "¥¤ ªâ¨à®¢ âì áá®æ¨ 樨 ä ©«®¢" |
12 | ?define EDIT_FILE_ASSOCIATIONS "¥¤ ªâ¨à®¢ âì áá®æ¨ 樨 ä ©«®¢" |
14 | ?define START_PATH " â àâ®¢ë© ¯ãâì: " |
13 | ?define START_PATH " â àâ®¢ë© ¯ãâì: " |
15 | #else |
14 | #else |
16 | ?define TITLE_SETT "Settings" |
15 | ?define TITLE_SETT "Settings" |
17 | ?define SHOW_DEVICE_CLASS "Show device class name" |
16 | ?define SHOW_DEVICE_CLASS "Show device class name" |
18 | ?define SHOW_STATUS_BAR "Show status bar" |
17 | ?define SHOW_STATUS_BAR "Show status bar" |
19 | ?define SHOW_BREADCRUMBS "Show breadcrumbs" |
18 | ?define SHOW_BREADCRUMBS "Show breadcrumbs" |
20 | ?define BIG_ICONS "Big icons in list" |
19 | ?define BIG_ICONS "Big icons in list" |
21 | ?define USE_TWO_PANELS "Two panels" |
20 | ?define COLORED_LINES "Highlight even lines in list" |
22 | ?define COLORED_LINES "Highlight even lines in list" |
- | |
23 | ?define FONT_SIZE_LABEL "Font size" |
21 | ?define FONT_SIZE_LABEL "Font size" |
24 | ?define LIST_LINE_HEIGHT "List line height" |
22 | ?define LIST_LINE_HEIGHT "List line height" |
25 | ?define SAVE_PATH_AS_DEFAULT "Current path" |
23 | ?define SAVE_PATH_AS_DEFAULT "Current path" |
26 | ?define SAVE_START_PATH_AS_DEFAULT "Typed path" |
24 | ?define SAVE_START_PATH_AS_DEFAULT "Typed path" |
27 | ?define EDIT_FILE_ASSOCIATIONS "Edit file associations" |
25 | ?define EDIT_FILE_ASSOCIATIONS "Edit file associations" |
28 | ?define START_PATH " Start path: " |
26 | ?define START_PATH " Start path: " |
29 | #endif |
27 | #endif |
30 | 28 | ||
31 | char path_start[4096]; |
29 | char path_start[4096]; |
32 | edit_box path_start_ed = {290,50,57,0xffffff,0x94AECE,0xffffff,0xffffff,0x10000000,4098, |
30 | edit_box path_start_ed = {290,50,57,0xffffff,0x94AECE,0xffffff,0xffffff,0x10000000,4098, |
33 | #path_start,0, 100000000000010b,0,0}; |
31 | #path_start,0, 100000000000010b,0,0}; |
34 | 32 | ||
35 | more_less_box font_size = { NULL, 9, 22, FONT_SIZE_LABEL }; |
33 | more_less_box font_size = { NULL, 9, 22, FONT_SIZE_LABEL }; |
36 | more_less_box line_height = { NULL, 16, 64, LIST_LINE_HEIGHT }; |
34 | more_less_box line_height = { NULL, 16, 64, LIST_LINE_HEIGHT }; |
37 | checkbox show_dev_name = { SHOW_DEVICE_CLASS }; |
35 | checkbox show_dev_name = { SHOW_DEVICE_CLASS }; |
38 | checkbox show_status_bar = { SHOW_STATUS_BAR }; |
36 | checkbox show_status_bar = { SHOW_STATUS_BAR }; |
39 | checkbox show_breadcrumb = { SHOW_BREADCRUMBS }; |
37 | checkbox show_breadcrumb = { SHOW_BREADCRUMBS }; |
40 | checkbox big_icons = { BIG_ICONS }; |
38 | checkbox big_icons = { BIG_ICONS }; |
41 | checkbox two_panels = { USE_TWO_PANELS }; |
39 | checkbox colored_lines = { COLORED_LINES }; |
42 | checkbox colored_lines = { COLORED_LINES }; |
- | |
43 | 40 | ||
44 | 41 | ||
45 | void settings_dialog() |
42 | void settings_dialog() |
46 | { |
43 | { |
47 | proc_info Settings; |
44 | proc_info Settings; |
48 | int id; |
45 | int id; |
49 | active_settings = true; |
46 | active_settings = true; |
50 | font_size.value = kfont.size.pt; |
47 | font_size.value = kfont.size.pt; |
51 | line_height.value = files.item_h; |
48 | line_height.value = files.item_h; |
52 | SetEventMask(0x27); |
49 | SetEventMask(0x27); |
53 | loop(){ |
50 | loop(){ |
54 | switch(WaitEvent()) |
51 | switch(WaitEvent()) |
55 | { |
52 | { |
56 | case evMouse: |
53 | case evMouse: |
57 | edit_box_mouse stdcall (#path_start_ed); |
54 | edit_box_mouse stdcall (#path_start_ed); |
58 | break; |
55 | break; |
59 | 56 | ||
60 | case evButton: |
57 | case evButton: |
61 | id=GetButtonID(); |
58 | id=GetButtonID(); |
62 | if (1==id) { ExitSettings(); break; } |
59 | if (1==id) { ExitSettings(); break; } |
63 | else if (id==5) |
60 | else if (id==5) |
64 | { |
61 | { |
65 | RunProgram("/sys/@open", "/sys/settings/assoc.ini"); |
62 | RunProgram("/sys/@open", "/sys/settings/assoc.ini"); |
66 | break; |
63 | break; |
67 | } |
64 | } |
68 | else if (id==6) |
65 | else if (id==6) |
69 | { |
66 | { |
70 | strcpy(#path_start,#path); |
67 | strcpy(#path_start,#path); |
71 | path_start_ed.size = path_start_ed.pos = strlen(#path_start); |
68 | path_start_ed.size = path_start_ed.pos = strlen(#path_start); |
72 | ini.SetString("DefaultPath", #path, strlen(#path)); |
69 | ini.SetString("DefaultPath", #path, strlen(#path)); |
73 | edit_box_draw stdcall (#path_start_ed); |
70 | edit_box_draw stdcall (#path_start_ed); |
74 | break; |
71 | break; |
75 | } |
72 | } |
76 | else if (id==7) |
73 | else if (id==7) |
77 | { |
74 | { |
78 | SetDefaultPath(#path_start); |
75 | SetDefaultPath(#path_start); |
79 | break; |
76 | break; |
80 | } |
77 | } |
81 | show_dev_name.click(id); |
78 | show_dev_name.click(id); |
82 | two_panels.click(id); |
79 | show_breadcrumb.click(id); |
83 | show_breadcrumb.click(id); |
- | |
84 | show_status_bar.click(id); |
80 | show_status_bar.click(id); |
85 | colored_lines.click(id); |
81 | colored_lines.click(id); |
86 | if (font_size.click(id)) { |
82 | if (font_size.click(id)) { |
87 | kfont.size.pt = font_size.value; |
83 | kfont.size.pt = font_size.value; |
88 | kfont.changeSIZE(); |
84 | kfont.changeSIZE(); |
89 | BigFontsChange(); |
85 | BigFontsChange(); |
90 | } |
86 | } |
91 | if (line_height.click(id)) files.item_h = files_inactive.item_h = line_height.value; |
87 | if (line_height.click(id)) files.item_h = files_inactive.item_h = line_height.value; |
92 | if (big_icons.click(id)) BigIconsSwitch(); |
88 | if (big_icons.click(id)) BigIconsSwitch(); |
93 | EventRedrawWindow(Form.left,Form.top); |
89 | EventRedrawWindow(Form.left,Form.top); |
94 | //RefreshWindow(Form.slot, Settings.slot); |
90 | //RefreshWindow(Form.slot, Settings.slot); |
95 | break; |
91 | break; |
96 | 92 | ||
97 | case evKey: |
93 | case evKey: |
98 | GetKeys(); |
94 | GetKeys(); |
99 | if (key_scancode==SCAN_CODE_ESC) ExitSettings(); |
95 | if (key_scancode==SCAN_CODE_ESC) ExitSettings(); |
100 | EAX= key_ascii << 8; |
96 | EAX= key_ascii << 8; |
101 | edit_box_key stdcall (#path_start_ed); |
97 | edit_box_key stdcall (#path_start_ed); |
102 | break; |
98 | break; |
103 | 99 | ||
104 | case evReDraw: |
100 | case evReDraw: |
105 | DefineAndDrawWindow(Form.cwidth-300/2+Form.left, Form.cheight-292/2+Form.top, 400, |
101 | DefineAndDrawWindow(Form.cwidth-300/2+Form.left, Form.cheight-292/2+Form.top, 400, |
106 | 365+skin_height,0x34,sc.work,TITLE_SETT,0); |
102 | 365+skin_height,0x34,sc.work,TITLE_SETT,0); |
107 | GetProcessInfo(#Settings, SelfInfo); |
103 | GetProcessInfo(#Settings, SelfInfo); |
108 | DrawSettingsCheckBoxes(); |
104 | DrawSettingsCheckBoxes(); |
109 | } |
105 | } |
110 | } |
106 | } |
111 | } |
107 | } |
112 | 108 | ||
113 | void ExitSettings() |
109 | void ExitSettings() |
114 | { |
110 | { |
115 | active_settings = false; |
111 | active_settings = false; |
116 | settings_window = 0; |
112 | settings_window = 0; |
117 | cmd_free = 4; |
113 | cmd_free = 4; |
118 | ExitProcess(); |
114 | ExitProcess(); |
119 | } |
115 | } |
120 | 116 | ||
121 | void DrawSettingsCheckBoxes() |
117 | void DrawSettingsCheckBoxes() |
122 | { |
118 | { |
123 | incn y; |
119 | incn y; |
124 | int x=11, frx=26, but_x; |
120 | int x=11, frx=26, but_x; |
125 | y.n = 0; |
121 | y.n = 0; |
126 | show_dev_name.draw(x, y.inc(14)); |
122 | show_dev_name.draw(x, y.inc(14)); |
127 | show_status_bar.draw(x, y.inc(25)); |
123 | show_status_bar.draw(x, y.inc(25)); |
128 | show_breadcrumb.draw(x, y.inc(25)); |
124 | show_breadcrumb.draw(x, y.inc(25)); |
129 | big_icons.draw(x, y.inc(25)); |
125 | big_icons.draw(x, y.inc(25)); |
130 | //two_panels.draw(x, y.inc(25)); |
126 | colored_lines.draw(x, y.inc(25)); |
131 | colored_lines.draw(x, y.inc(25)); |
- | |
132 | font_size.draw(x, y.inc(31)); |
127 | font_size.draw(x, y.inc(31)); |
133 | line_height.draw(x, y.inc(31)); |
128 | line_height.draw(x, y.inc(31)); |
134 | 129 | ||
135 | DrawFrame(x, y.inc(37), 340, 95, START_PATH); |
130 | DrawFrame(x, y.inc(37), 340, 95, START_PATH); |
136 | // START_PATH { |
131 | // START_PATH { |
137 | DrawEditBoxPos(frx, y.inc(21), #path_start_ed); |
132 | DrawEditBoxPos(frx, y.inc(21), #path_start_ed); |
138 | but_x = DrawStandartCaptButton(frx, y.inc(34), 6, SAVE_PATH_AS_DEFAULT); |
133 | but_x = DrawStandartCaptButton(frx, y.inc(34), 6, SAVE_PATH_AS_DEFAULT); |
139 | DrawStandartCaptButton(frx+but_x, y.inc(0), 7, SAVE_START_PATH_AS_DEFAULT); |
134 | DrawStandartCaptButton(frx+but_x, y.inc(0), 7, SAVE_START_PATH_AS_DEFAULT); |
140 | // } START_PATH |
135 | // } START_PATH |
141 | 136 | ||
142 | DrawStandartCaptButton(x, y.inc(52), 5, EDIT_FILE_ASSOCIATIONS); |
137 | DrawStandartCaptButton(x, y.inc(52), 5, EDIT_FILE_ASSOCIATIONS); |
143 | } |
138 | } |
144 | 139 | ||
145 | 140 | ||
146 | void LoadIniSettings() |
141 | void LoadIniSettings() |
147 | { |
142 | { |
148 | ini.path = GetIni(#eolite_ini_path, "app.ini"); |
143 | ini.path = GetIni(#eolite_ini_path, "app.ini"); |
149 | if (efm) ini.section = "EFM"; else ini.section = "Eolite"; |
144 | if (efm) ini.section = "EFM"; else ini.section = "Eolite"; |
150 | two_panels.checked = efm; |
145 | |
151 | - | ||
152 | files.SetFont(6, 9, 10000000b); |
146 | files.SetFont(6, 9, 10000000b); |
153 | show_dev_name.checked = ini.GetInt("ShowDeviceName", true); |
147 | show_dev_name.checked = ini.GetInt("ShowDeviceName", true); |
154 | show_status_bar.checked = ini.GetInt("ShowStatusBar", true); |
148 | show_status_bar.checked = ini.GetInt("ShowStatusBar", true); |
155 | big_icons.checked = ini.GetInt("BigIcons", false); BigIconsSwitch(); |
149 | big_icons.checked = ini.GetInt("BigIcons", false); BigIconsSwitch(); |
156 | //two_panels.checked = ini.GetInt("TwoPanels", false); |
150 | colored_lines.checked = ini.GetInt("ColoredLines", true); |
157 | colored_lines.checked = ini.GetInt("ColoredLines", true); |
- | |
158 | kfont.size.pt = ini.GetInt("FontSize", 13); |
151 | kfont.size.pt = ini.GetInt("FontSize", 13); |
159 | files.item_h = ini.GetInt("LineHeight", 19); |
152 | files.item_h = ini.GetInt("LineHeight", 19); |
160 | Form.left = ini.GetInt("WinX", 100); |
153 | Form.left = ini.GetInt("WinX", 100); |
161 | Form.top = ini.GetInt("WinY", 30); |
154 | Form.top = ini.GetInt("WinY", 30); |
162 | Form.width = ini.GetInt("WinW", efm*170+550); |
155 | Form.width = ini.GetInt("WinW", efm*170+550); |
163 | Form.height = ini.GetInt("WinH", efm*100+517); |
156 | Form.height = ini.GetInt("WinH", efm*100+517); |
164 | ini.GetString("DefaultPath", #path, 4096, "/rd/1"); |
157 | ini.GetString("DefaultPath", #path, 4096, "/rd/1"); |
165 | ini.GetString("DefaultPath", #path_start, 4096, "/rd/1"); |
158 | ini.GetString("DefaultPath", #path_start, 4096, "/rd/1"); |
166 | path_start_ed.size = path_start_ed.pos = strlen(#path_start); |
159 | path_start_ed.size = path_start_ed.pos = strlen(#path_start); |
167 | 160 | ||
168 | ini_get_str stdcall ("/sys/SETTINGS/SYSTEM.INI", "system", "font file",#temp,4096,DEFAULT_FONT); |
161 | ini_get_str stdcall ("/sys/SETTINGS/SYSTEM.INI", "system", "font file",#temp,4096,DEFAULT_FONT); |
169 | kfont.init(#temp); |
162 | kfont.init(#temp); |
170 | ini_get_str stdcall ("/sys/SETTINGS/SYSTEM.INI", "system", "font smoothing",#temp,4096,"on"); |
163 | ini_get_str stdcall ("/sys/SETTINGS/SYSTEM.INI", "system", "font smoothing",#temp,4096,"on"); |
171 | if(!strcmp(#temp,"off")) kfont.smooth = false; else kfont.smooth = true; |
164 | if(!strcmp(#temp,"off")) kfont.smooth = false; else kfont.smooth = true; |
172 | } |
165 | } |
173 | 166 | ||
174 | 167 | ||
175 | void SaveIniSettings() |
168 | void SaveIniSettings() |
176 | { |
169 | { |
177 | ini.SetInt("ShowDeviceName", show_dev_name.checked); |
170 | ini.SetInt("ShowDeviceName", show_dev_name.checked); |
178 | ini.SetInt("ShowStatusBar", show_status_bar.checked); |
171 | ini.SetInt("ShowStatusBar", show_status_bar.checked); |
179 | ini.SetInt("BigIcons", big_icons.checked); |
172 | ini.SetInt("BigIcons", big_icons.checked); |
180 | //ini.SetInt("TwoPanels", two_panels.checked); |
173 | ini.SetInt("ColoredLines", colored_lines.checked); |
181 | ini.SetInt("ColoredLines", colored_lines.checked); |
- | |
182 | ini.SetInt("FontSize", kfont.size.pt); |
174 | ini.SetInt("FontSize", kfont.size.pt); |
183 | ini.SetInt("LineHeight", files.item_h); |
175 | ini.SetInt("LineHeight", files.item_h); |
184 | if (Form.status_window<=2) { |
176 | if (Form.status_window<=2) { |
185 | ini.SetInt("WinX", Form.left); |
177 | ini.SetInt("WinX", Form.left); |
186 | ini.SetInt("WinY", Form.top); |
178 | ini.SetInt("WinY", Form.top); |
187 | ini.SetInt("WinW", Form.width); |
179 | ini.SetInt("WinW", Form.width); |
188 | ini.SetInt("WinH", Form.height); |
180 | ini.SetInt("WinH", Form.height); |
189 | } |
181 | } |
190 | } |
182 | } |
191 | 183 | ||
192 | 184 | ||
193 | 185 | ||
194 | void Write_Error(int error_number) |
186 | void Write_Error(int error_number) |
195 | { |
187 | { |
196 | char error_message[500]; |
188 | char error_message[500]; |
197 | sprintf(#error_message,"\"%s\n%s\" -%s","Eolite",get_error(error_number),"tE"); |
189 | sprintf(#error_message,"\"%s\n%s\" -%s","Eolite",get_error(error_number),"tE"); |
198 | notify(#error_message); |
190 | notify(#error_message); |
199 | } |
191 | } |
200 | 192 | ||
201 | 193 | ||
202 | void LoadIcons() |
194 | void LoadIcons() |
203 | { |
195 | { |
204 | dword selected_shadow = MixColors(col.selec, 0, 200); |
196 | dword selected_shadow = MixColors(col.selec, 0, 200); |
205 | dword non_white_shadow = MixColors(col.list_bg, 0, 200); |
197 | dword non_white_shadow = MixColors(col.list_bg, 0, 200); |
206 | if (big_icons.checked) |
198 | if (big_icons.checked) |
207 | { |
199 | { |
208 | icons32_default.load("/sys/icons32.png"); |
200 | icons32_default.load("/sys/icons32.png"); |
209 | icons32_selected.load("/sys/icons32.png"); |
201 | icons32_selected.load("/sys/icons32.png"); |
210 | //FUUUUUU... the next ugly code may replace the previous line |
202 | //FUUUUUU... the next ugly code may replace the previous line |
211 | //we are copying raw data without loading and unpycking PNG |
203 | //we are copying raw data without loading and unpycking PNG |
212 | //memmov(icons32_selected.imgsrc, icons32_default.imgsrc, icons32_default.h*32*4); |
204 | //memmov(icons32_selected.imgsrc, icons32_default.imgsrc, icons32_default.h*32*4); |
213 | //EDI = icons32_selected.image; |
205 | //EDI = icons32_selected.image; |
214 | //ESDWORD[EDI+04] = 32; |
206 | //ESDWORD[EDI+04] = 32; |
215 | //ESDWORD[EDI+08] = icons32_default.h; |
207 | //ESDWORD[EDI+08] = icons32_default.h; |
216 | //ESDWORD[EDI+20] = IMAGE_BPP32; |
208 | //ESDWORD[EDI+20] = IMAGE_BPP32; |
217 | //ESDWORD[EDI+24] = icons32_selected.imgsrc; |
209 | //ESDWORD[EDI+24] = icons32_selected.imgsrc; |
218 | icons32_default.replace_color(0x00000000, col.list_bg); |
210 | icons32_default.replace_color(0x00000000, col.list_bg); |
219 | icons32_selected.replace_color(0x00000000, col.selec); |
211 | icons32_selected.replace_color(0x00000000, col.selec); |
220 | } else { |
212 | } else { |
221 | icons16_default.load("/sys/icons16.png"); |
213 | icons16_default.load("/sys/icons16.png"); |
222 | icons16_selected.load("/sys/icons16.png"); |
214 | icons16_selected.load("/sys/icons16.png"); |
223 | icons16_selected.replace_2colors(0xffFFFfff, col.selec, 0xffCACBD6, selected_shadow); |
215 | icons16_selected.replace_2colors(0xffFFFfff, col.selec, 0xffCACBD6, selected_shadow); |
224 | if (col.list_bg!=0xFFFfff) { |
216 | if (col.list_bg!=0xFFFfff) { |
225 | icons16_default.replace_2colors(0xffFFFfff, col.list_bg, 0xffCACBD6, non_white_shadow); |
217 | icons16_default.replace_2colors(0xffFFFfff, col.list_bg, 0xffCACBD6, non_white_shadow); |
226 | } |
218 | } |
227 | } |
219 | } |
228 | 220 | ||
229 | } |
221 | } |
230 | 222 | ||
231 | void SetAppColors() |
223 | void SetAppColors() |
232 | { |
224 | { |
233 | int i; |
225 | int i; |
234 | static dword bg_col; |
226 | static dword bg_col; |
235 | dword old_list_bg_color = col.list_bg; |
227 | dword old_list_bg_color = col.list_bg; |
236 | sc.get(); |
228 | sc.get(); |
237 | sc.work_dark = MixColors(0, sc.work, 35); |
229 | sc.work_dark = MixColors(0, sc.work, 35); |
238 | if (sc.work == 0) sc.work = 1; |
230 | if (sc.work == 0) sc.work = 1; |
239 | if (bg_col == sc.work) return; |
231 | if (bg_col == sc.work) return; |
240 | bg_col = sc.work; |
232 | bg_col = sc.work; |
241 | if (skin_is_dark()) |
233 | if (skin_is_dark()) |
242 | { |
234 | { |
243 | //use dark colors |
235 | //use dark colors |
244 | col.def = false; |
236 | col.def = false; |
245 | col.list_bg = sc.work; |
237 | col.list_bg = sc.work; |
246 | col.list_gb_text = sc.work_text; |
238 | col.list_gb_text = sc.work_text; |
247 | col.list_text_hidden = 0xA6A6B7; |
239 | col.list_text_hidden = 0xA6A6B7; |
248 | col.list_vert_line = sc.work_graph; |
240 | col.list_vert_line = sc.work_graph; |
249 | col.lpanel = MixColors(sc.work_graph, sc.work, 65); |
241 | col.lpanel = MixColors(sc.work_graph, sc.work, 65); |
250 | col.selec = col.selec_active = sc.button; |
242 | col.selec = col.selec_active = sc.button; |
251 | col.selec_text = sc.button_text; |
243 | col.selec_text = sc.button_text; |
252 | if (col.list_bg==col.selec) col.selec = sc.work_graph; //for fucking skins |
244 | if (col.list_bg==col.selec) col.selec = sc.work_graph; //for fucking skins |
253 | col.slider_bg_big = MixColors(0xCED0D0, sc.work, 35); |
245 | col.slider_bg_big = MixColors(0xCED0D0, sc.work, 35); |
254 | col.odd_line = MixColors(0xFFFfff, sc.work, 15); |
246 | col.odd_line = MixColors(0xFFFfff, sc.work, 15); |
255 | for (i=0; blue_hl_pal[i]!=0; i++) waves_pal[i] = MixColors(col.lpanel, blue_hl_pal[i], 180); |
247 | for (i=0; blue_hl_pal[i]!=0; i++) waves_pal[i] = MixColors(col.lpanel, blue_hl_pal[i], 180); |
256 | } |
248 | } |
257 | else |
249 | else |
258 | { |
250 | { |
259 | //use light colors |
251 | //use light colors |
260 | col.def = true; |
252 | col.def = true; |
261 | col.list_bg = 0xFFFfff; |
253 | col.list_bg = 0xFFFfff; |
262 | col.list_gb_text = 0x000000; |
254 | col.list_gb_text = 0x000000; |
263 | col.list_text_hidden = 0xA6A6B7; |
255 | col.list_text_hidden = 0xA6A6B7; |
264 | col.list_vert_line = 0xDDD7CF; |
256 | col.list_vert_line = 0xDDD7CF; |
265 | col.lpanel = 0x00699C; |
257 | col.lpanel = 0x00699C; |
266 | col.selec = col.selec_active = 0x92B1D9; |
258 | col.selec = col.selec_active = 0x92B1D9; |
267 | col.selec_text = 0x000000; |
259 | col.selec_text = 0x000000; |
268 | col.slider_bg_big = 0xCDCFCF; |
260 | col.slider_bg_big = 0xCDCFCF; |
269 | col.odd_line = 0xF4F5F5; |
261 | col.odd_line = 0xF4F5F5; |
270 | for (i=0; blue_hl_pal[i]!=0; i++) waves_pal[i] = blue_hl_pal[i]; |
262 | for (i=0; blue_hl_pal[i]!=0; i++) waves_pal[i] = blue_hl_pal[i]; |
271 | } |
263 | } |
272 | col.selec_inactive = MixColors(0xBBBbbb, col.list_bg, 65); |
264 | col.selec_inactive = MixColors(0xBBBbbb, col.list_bg, 65); |
273 | col.slider_bg_left = MixColors(sc.work_graph, col.slider_bg_big, 10); |
265 | col.slider_bg_left = MixColors(sc.work_graph, col.slider_bg_big, 10); |
274 | for (i=0; i<20; i++) col.work_gradient[i] = MixColors(sc.work_light, sc.work, i*5); |
266 | for (i=0; i<20; i++) col.work_gradient[i] = MixColors(sc.work_light, sc.work, i*5); |
275 | if (old_list_bg_color!=col.list_bg) LoadIcons(); |
267 | if (old_list_bg_color!=col.list_bg) LoadIcons(); |
276 | } |
268 | } |
277 | 269 | ||
278 | 270 | ||
279 | void BigFontsChange() |
271 | void BigFontsChange() |
280 | { |
272 | { |
281 | files.item_h = kfont.size.pt + 4; |
273 | files.item_h = kfont.size.pt + 4; |
282 | if (files.item_h |
274 | if (files.item_h |
283 | files.item_h = icon_size+3; |
275 | files.item_h = icon_size+3; |
284 | line_height.value = files.item_h; |
276 | line_height.value = files.item_h; |
285 | line_height.redraw(); |
277 | line_height.redraw(); |
286 | } |
278 | } |
287 | files_active.item_h = files_inactive.item_h = files.item_h; |
279 | files_active.item_h = files_inactive.item_h = files.item_h; |
288 | } |
280 | } |
289 | 281 | ||
290 | void BigIconsSwitch() |
282 | void BigIconsSwitch() |
291 | { |
283 | { |
292 | if (big_icons.checked) { |
284 | if (big_icons.checked) { |
293 | icon_size = 32; |
285 | icon_size = 32; |
294 | LoadIcons(); |
286 | LoadIcons(); |
295 | } else { |
287 | } else { |
296 | icon_size = icons16_default.w; |
288 | icon_size = icons16_default.w; |
297 | } |
289 | } |
298 | BigFontsChange(); |
290 | BigFontsChange(); |
299 | } |
291 | } |
300 | 292 | ||
301 | void SetDefaultPath(dword p) |
293 | void SetDefaultPath(dword p) |
302 | { |
294 | { |
303 | ini.SetString("DefaultPath", p, strlen(p)); |
295 | ini.SetString("DefaultPath", p, strlen(p)); |
304 | notify("'Default path has been set' -O"); |
296 | notify("'Default path has been set' -O"); |
305 | }20;>=2)>><> |
297 | }20;>=2)>><> |