Subversion Repositories Kolibri OS

Rev

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

Rev 7783 Rev 7784
Line 136... Line 136...
136
}
136
}
Line 137... Line 137...
137
 
137
 
138
void draw_list()
138
void draw_list()
139
{
139
{
-
 
140
	int i, item_y;
-
 
141
	dword name_color;
Line -... Line 142...
-
 
142
	dword hotkey_color;
-
 
143
 
-
 
144
	static dword inactive_background_color;
-
 
145
	static dword active_background_color;
-
 
146
	static dword active_top_border_color;
-
 
147
	static dword inactive_text_shadow_color;
-
 
148
	static bool skin_dark;
-
 
149
 
-
 
150
	static bool colors_set;
-
 
151
	if (!colors_set) {
140
	int i, item_y;
152
		colors_set = true;
141
 
153
		inactive_background_color = MixColors(system.color.work, 0xFFFfff,230);
142
	dword active_background_color = MixColors(system.color.work_button, system.color.work,230);
154
		active_background_color = MixColors(system.color.work_button, system.color.work,230);
143
	dword active_top_border_color = MixColors(system.color.work_graph, system.color.work_button,240);
-
 
144
	dword inactive_text_shadow_color = MixColors(system.color.work,0xFFFfff,150);
155
		active_top_border_color = MixColors(system.color.work_graph, system.color.work_button,240);
-
 
156
		inactive_text_shadow_color = MixColors(system.color.work,0xFFFfff,120);
Line 145... Line 157...
145
	dword text_color;
157
		skin_dark = skin_is_dark();
146
	bool skin_dark = skin_is_dark();
158
	}
147
 
159
 
148
	for (i=0; i
160
	for (i=0; i
149
	{
161
	{
150
		item_y = i*ITEM_H+menu1.y;
162
		item_y = i*ITEM_H+menu1.y;
151
		if (i==menu1.cur_y) {
163
		if (i==menu1.cur_y) {
152
			text_color = system.color.work_button_text;
164
			hotkey_color = name_color = system.color.work_button_text;
153
			DrawBar(menu1.x, item_y+1,        menu1.w, ITEM_H-2, active_background_color);
-
 
154
			DrawBar(menu1.x, item_y,          menu1.w, 1, active_top_border_color);
165
			DrawBar(menu1.x, item_y+1,        menu1.w, ITEM_H-2, active_background_color);
155
			DrawBar(menu1.x, item_y+ITEM_H-1, menu1.w, 1, system.color.work_light);
166
			DrawBar(menu1.x, item_y,          menu1.w, 1, active_top_border_color);
-
 
167
			DrawBar(menu1.x, item_y+ITEM_H-1, menu1.w, 1, system.color.work_light);
156
			WriteText(13 + max_name_len, item_y + menu1.text_y, 0x80, text_color, hotkeys.get(i));
168
		} else {
157
		} else {
169
			name_color = system.color.work_text;
158
			text_color = system.color.work_text;
170
			hotkey_color = system.color.work_graph;
159
			DrawBar(menu1.x, item_y, menu1.w, ITEM_H, system.color.work);
171
			DrawBar(menu1.x, item_y, menu1.w, ITEM_H, inactive_background_color);
-
 
172
			if (!skin_dark) WriteText(13+1, item_y + menu1.text_y +1, 0x80, 
-
 
173
				inactive_text_shadow_color, names.get(i));
160
			if (!skin_dark) WriteText(13+1, item_y + menu1.text_y +1, 0x80, inactive_text_shadow_color, names.get(i));
174
		}
161
			WriteText(13 + max_name_len, item_y + menu1.text_y, 0x80, system.color.work_graph, hotkeys.get(i));
175
		WriteText(-strlen(hotkeys.get(i))*6 + 13 + max_name_len + max_hotkey_len, 
162
		}
176
			item_y + menu1.text_y, 0x80, hotkey_color, hotkeys.get(i));
163
		WriteText(13, item_y + menu1.text_y, 0x80, text_color, names.get(i));
177
		WriteText(13, item_y + menu1.text_y, 0x80, name_color, names.get(i));
Line 164... Line 178...
164
	}
178
	}