Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7646 → Rev 7647

/programs/cmm/eolite/Eolite.c
52,6 → 52,7
 
struct Eolite_colors
{
bool def;
dword lpanel;
dword list_vert_line; //vertical line between columns in list
dword selec;
588,7 → 589,7
//main rectangles
DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42-status_bar_h,col.graph);
DrawRectangle(0,39,Form.cwidth-1,-show_status_bar.checked*status_bar_h + Form.cheight - 40,col.work_gradient[4]); //bg
for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col.work_gradient[11-i]);
for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col.work_gradient[-i*3+15]);
llist_copy(#files_active, #files);
strcpy(#active_path, #path);
DrawStatusBar();
/programs/cmm/eolite/include/gui.h
67,7 → 67,7
{
int i, fill_h;
if (h < 12) {
for (i=0; i<h; i++) DrawBar(x, y+i, w, 1, col.work_gradient[12-i]);
for (i=0; i<h; i++) DrawBar(x, y+i, w, 1, col.work_gradient[-i*3+15]);
} else {
DrawBar(x, y, w, h, col.work_gradient[12]);
}
/programs/cmm/eolite/include/left_panel.h
209,13 → 209,19
 
void Tip(int y, dword caption, id, arrow)
{
if (col.def) {
DrawBar(17,y,160,1,0xEFEDEE);
DrawFilledBarInner(17, y+1, 160, 16);
WriteText(25,y+5,0x80,0x000000,caption);
if (id) DefineButton(159,y+1,16,16,id+BT_HIDE+BT_NOFRAME,0); //arrow button
WriteText(165,y+5,0x80,0x000000,arrow); //arrow
DrawBar(17,y+17,160,1,0x7E87A3);
} else {
DrawBar(17,y,160,1,col.graph);
DrawBar(17,y+1,160,16,col.list_bg);
DrawBar(17,y+17,160,1,col.graph);
}
WriteText(25,y+5,0x80,col.list_gb_text,caption);
if (id) DefineButton(159,y+1,16,16,id+BT_HIDE+BT_NOFRAME,0); //arrow button
WriteText(165,y+5,0x80,col.list_gb_text,arrow); //arrow
}
 
void ActionsDraw()
{
244,7 → 250,7
DrawBar(2,56,15,actions_y+103,col.lpanel); //ñèíèé ïðÿìîóãîëüíèê - ñëåâà
DrawBar(177,56,15,actions_y+103,col.lpanel); //ñèíèé ïðÿìîóãîëüíèê - ñïðàâà
area_h = Form.cheight-start_y-2 - status_bar_h;
if (col.lpanel == 0x00699C)
if (col.def)
{
if (area_h < 268){
PutPaletteImage(#blue_hl, 190, area_h, 2, start_y, 8, #blue_hl_pal);
/programs/cmm/eolite/include/settings.h
233,6 → 233,7
if (GrayScaleImage(#bg_col,1,1)>=65)
{
//use light colors
col.def = true;
col.list_bg = 0xFFFfff;
col.list_gb_text = 0x000000;
col.list_text_hidden = 0xA6A6B7;
249,6 → 250,7
else
{
//use dark colors
col.def = false;
col.list_bg = system.color.work;
col.list_gb_text = system.color.work_text;
col.list_text_hidden = 0xA6A6B7;
/programs/cmm/eolite/include/translations.h
1,5 → 1,5
#define TITLE "Eolite File Manager 4.21b"
#define ABOUT_TITLE "EOLITE 4.21b"
#define TITLE "Eolite File Manager 4.21c"
#define ABOUT_TITLE "EOLITE 4.21c"
 
#ifdef LANG_RUS
?define T_FILE "” ©«"
/programs/cmm/kf_font_viewer/font_viewer.c
17,6 → 17,7
block preview = { 0, PANELH, WIN_W, WIN_H - PANELH };
checkbox bold = { "Bold", false };
checkbox smooth = { "Smooth", true };
checkbox colored = { "Colored", true };
 
void main()
{
31,8 → 32,9
case evButton:
btn = GetButtonID();
if (btn==1) ExitProcess();
if (bold.click(btn)) kfont.bold = bold.checked;
if (smooth.click(btn)) kfont.smooth = smooth.checked;
bold.click(btn);
smooth.click(btn);
colored.click(btn);
if (btn==PHRASE_TAB) || (btn==CHARS_TAB) tabs.click(btn);
goto _DRAW_WINDOW_CONTENT;
case evReDraw:
42,10 → 44,14
if (Form.status_window>2) break;
_DRAW_WINDOW_CONTENT:
 
kfont.bold = bold.checked;
kfont.smooth = smooth.checked;
 
DrawBar(0, 0, Form.cwidth, PANELH-1, system.color.work);
DrawBar(0, PANELH-1,Form.cwidth,1,system.color.work_graph);
bold.draw(10, 8);
smooth.draw(83,8);
colored.draw(170,8);
 
tabs.draw_button(Form.cwidth-130, PHRASE_TAB, "Phrase");
tabs.draw_button(Form.cwidth-60, CHARS_TAB, "Chars");
61,15 → 67,21
}
}
 
dword pal[] = { 0x4E4153, 0x57417C, 0x89633B, 0x819156, 0x00CCCC, 0x2AD266,
0xE000CC, 0x0498F9, 0xC3A9F5, 0xFFC200, 0xFF5836, 0xA086BA,
0,0,0,0,0 };
 
void DrawPreviewPhrase()
{
dword i, y;
dword c;
char line[256];
kfont.raw_size = free(kfont.raw);
for (i=10, y=5; i<22; i++, y+=kfont.height;) //not flexible, need to calculate font count and max line length
for (i=10, y=12; i<22; i++, y+=kfont.height+3;) //not flexible, need to calculate font count and max line length
{
if (colored.checked) c = pal[i-10]; else c=0;
sprintf(#line," §¬¥à èà¨äâ /size font %d ¯¨ªá¥«¥©.",i);
kfont.WriteIntoBuffer(10,y,Form.cwidth,Form.cheight-PANELH, 0xFFFFFF, 0, i, #line);
kfont.WriteIntoBuffer(14,y,Form.cwidth,Form.cheight-PANELH, 0xFFFFFF, c, i, #line);
}
if (kfont.smooth) kfont.ApplySmooth();
kfont.ShowBuffer(preview.x, preview.y);
/programs/cmm/lib/gui.h
69,7 → 69,7
dword ty = h/2-7+y;
 
if (id>0) DefineButton(x,y,w,h,id,color_b);
WriteText(tx+1,ty+1,0x90,MixColors(color_b,0,230),text);
WriteText(tx+1,ty+1,0x90,LightenDarkenColor(color_b, -40),text);
WriteText(tx,ty,0x90,color_t,text);
}
 
84,15 → 84,16
int ty = y + padding_v+1;
int tw = strlen(text)*8;
int w = tw + padding_h + padding_h;
unsigned darker_color = LightenDarkenColor(system.color.work_button, -40);
 
 
if (id>0) DefineButton(x,y,w,h,id,system.color.work_button);
 
WriteText(tx+1,ty+1,0x90,MixColors(system.color.work_button,0,230),text);
WriteText(tx+1,ty+1,0x90,darker_color,text);
WriteText(tx,ty,0x90,system.color.work_button_text,text);
 
if (active_button_id==id) {
DrawBar(tx,ty+15,tw,1, MixColors(system.color.work_button,0,230));
DrawBar(tx,ty+15,tw,1, darker_color);
DrawBar(tx,ty+14,tw,1, system.color.work_button_text);
}
 
99,6 → 100,13
return w + right_margin;
}
 
:unsigned LightenDarkenColor(dword color, amt) {
dword r = color >> 16 + amt << 16;
dword b = color >> 8 & 0x00FF + amt << 8;
dword g = color & 0x0000FF + amt;
return g | b | r ;
}
 
:void ActiveButtonSwitch(int min, max)
{
active_button_id++;
/programs/cmm/lib/kolibri.h
77,14 → 77,10
};
 
//------------------------------------------------------------------------------
:dword wait_event_code;
inline fastcall dword WaitEvent()
{
$mov eax,10
$int 0x40
wait_event_code = EAX;
//if(wait_event_code==evMouse) MOUSE.get();
//return wait_event_code;
}
 
inline fastcall dword CheckEvent()
91,7 → 87,6
{
$mov eax,11
$int 0x40
wait_event_code = EAX;
}
 
:dword WaitEventTimeout(dword time)
99,7 → 94,6
EAX = 23;
EBX = time;
$int 0x40
wait_event_code = EAX;
}
inline fastcall dword SetEventMask(EBX)
/programs/cmm/software_widget/software_widget.c
46,8 → 46,8
 
void load_config()
{
ini_get_str stdcall (#settings_ini_path, "Config", "window_title", #window_title, sizeof(window_title), "Software widget");
ini_get_int stdcall (#settings_ini_path, "Config", "window_width", 690);
ini_get_str stdcall (#settings_ini_path, "Config", "title", #window_title, sizeof(window_title), "Software widget");
ini_get_int stdcall (#settings_ini_path, "Config", "win_width", 690);
window_width = EAX;
ini_get_int stdcall (#settings_ini_path, "Config", "cell_w", 73);
list.item_w = EAX;