Eolite 2.93: fix for option "Use big fonts", supports only English characters yet

git-svn-id: svn://kolibrios.org@5687 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2015-08-06 16:13:03 +00:00
parent ec666fa4f4
commit d1fc876276
3 changed files with 33 additions and 24 deletions

View File

@ -103,8 +103,8 @@
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
enum { CREATE_FILE=1, CREATE_FOLDER, RENAME_ITEM }; //NewElement enum { CREATE_FILE=1, CREATE_FOLDER, RENAME_ITEM }; //NewElement
#define TITLE "Eolite File Manager v2.92" #define TITLE "Eolite File Manager v2.93"
#define ABOUT_TITLE "Eolite 2.92" #define ABOUT_TITLE "Eolite 2.93"
dword col_padding, col_selec, col_lpanel; dword col_padding, col_selec, col_lpanel;
int toolbar_buttons_x[7]={9,46,85,134,167,203}; int toolbar_buttons_x[7]={9,46,85,134,167,203};
@ -132,6 +132,7 @@ byte
real_files_names_case=0, real_files_names_case=0,
use_big_fonts=0, use_big_fonts=0,
font_type, font_type,
font_h,
info_after_copy=0, info_after_copy=0,
sort_num=2, sort_num=2,
itdir; itdir;
@ -743,7 +744,7 @@ void Line_ReDraw(dword color, filenum){
if (! TestBit(attr, 4) ) //file or folder? if (! TestBit(attr, 4) ) //file or folder?
{ {
Put_icon(file_name_off+_strrchr(file_name_off,'.'), files.x+3, files.line_h/2-7+y, color, 0); Put_icon(file_name_off+_strrchr(file_name_off,'.'), files.x+3, files.line_h/2-7+y, color, 0);
WriteText(7-strlen(ConvertSize(file.sizelo))*6+Form.cwidth - 76,files.line_h-6/2+y,font_type,0,ConvertSize(file.sizelo)); WriteText(7-strlen(ConvertSize(file.sizelo))*6+Form.cwidth - 76, files.line_h - font_h/ 2 + y,font_type,0,ConvertSize(file.sizelo));
} }
else else
{ {
@ -764,9 +765,9 @@ void Line_ReDraw(dword color, filenum){
{ {
FileShow.start_x = files.x + 23; FileShow.start_x = files.x + 23;
FileShow.font_color = text_col; FileShow.font_color = text_col;
FileShow.area_size_x = Form.width - 380; FileShow.area_size_x = files.w - 164;
FileShow.text_pointer = file_name_off; FileShow.text_pointer = file_name_off;
FileShow.start_y = files.text_y+y; FileShow.start_y = files.line_h - font_h/ 2 + y;
PathShow_prepare stdcall(#FileShow); PathShow_prepare stdcall(#FileShow);
PathShow_draw stdcall(#FileShow); PathShow_draw stdcall(#FileShow);
} }

View File

@ -29,7 +29,7 @@ char *ext[]={
void Put_icon(dword extension, xx, yy, fairing_color, icon_n) void Put_icon(dword extension, xx, yy, fairing_color, icon_n)
{ {
int i, font_half_width; int i, font_half_height;
if (extension) for (i=0; ext[i]!=0; i+=2;) if (extension) for (i=0; ext[i]!=0; i+=2;)
{ {
@ -43,8 +43,8 @@ void Put_icon(dword extension, xx, yy, fairing_color, icon_n)
ficons_pal[0] = fairing_color; ficons_pal[0] = fairing_color;
PutPaletteImage(icon_n*16*15+#ficons,16,15,xx,yy,8,#ficons_pal); PutPaletteImage(icon_n*16*15+#ficons,16,15,xx,yy,8,#ficons_pal);
if (fairing_color!=0xFFFfff) IconFairing(icon_n, xx, yy, fairing_color); if (fairing_color!=0xFFFfff) IconFairing(icon_n, xx, yy, fairing_color);
if (use_big_fonts) font_half_width=4; else font_half_width=3; if (use_big_fonts) font_half_height=0; else font_half_height=4;
if (icon_n!=17) && (strlen(extension)<9) WriteText(-strlen(extension)*font_half_width+Form.cwidth-120,yy+4,font_type,0,extension); if (icon_n!=17) && (strlen(extension)<9) WriteText(-FileShow.font_size_x/2*strlen(extension)+Form.cwidth-121,yy+font_half_height,font_type,0,extension);
} }

View File

@ -7,7 +7,7 @@
?define TITLE_SETT "<EFBFBD> áâனª¨" ?define TITLE_SETT "<EFBFBD> áâனª¨"
?define SHOW_DEVICE_CLASS "‚뢮¤¨âì ­ §¢ ­¨ï ª« áá  ãáâனáâ¢" ?define SHOW_DEVICE_CLASS "‚뢮¤¨âì ­ §¢ ­¨ï ª« áá  ãáâனáâ¢"
?define SHOW_REAL_NAMES "<EFBFBD>®ª §ë¢ âì ¨¬¥­  ä ©«®¢ ­¥ ¬¥­ïï ॣ¨áâà" ?define SHOW_REAL_NAMES "<EFBFBD>®ª §ë¢ âì ¨¬¥­  ä ©«®¢ ­¥ ¬¥­ïï ॣ¨áâà"
?define USE_BIG_FONTS "ˆá¯®«ì§®¢ âì 㢥«¨ç¥­­ë¥ èà¨äâë" ?define USE_BIG_FONTS "<EFBFBD>®«ì让 èà¨äâ (⮫쪮  ­£«¨©áª¨¥ ᨬ¢®«ë!)"
?define LIST_LINE_HEIGHT "‚ëá®â  áâப¨ ¢ ᯨ᪥" ?define LIST_LINE_HEIGHT "‚ëá®â  áâப¨ ¢ ᯨ᪥"
?define NOTIFY_COPY_END "“¢¥¤®¬«ïâì ® § ¢¥à襭¨¨ ª®¯¨à®¢ ­¨ï" ?define NOTIFY_COPY_END "“¢¥¤®¬«ïâì ® § ¢¥à襭¨¨ ª®¯¨à®¢ ­¨ï"
?define CANCEL_T "Žâ¬¥­ " ?define CANCEL_T "Žâ¬¥­ "
@ -18,7 +18,7 @@
?define TITLE_SETT "Settings" ?define TITLE_SETT "Settings"
?define SHOW_DEVICE_CLASS "Show device class name" ?define SHOW_DEVICE_CLASS "Show device class name"
?define SHOW_REAL_NAMES "Show real file names without changing case" ?define SHOW_REAL_NAMES "Show real file names without changing case"
?define USE_BIG_FONTS "Use big fonts" ?define USE_BIG_FONTS "Use big fonts (English characters only!)"
?define LIST_LINE_HEIGHT "List line height" ?define LIST_LINE_HEIGHT "List line height"
?define NOTIFY_COPY_END "Notify when copying finished" ?define NOTIFY_COPY_END "Notify when copying finished"
?define CANCEL_T "Cancel" ?define CANCEL_T "Cancel"
@ -86,7 +86,7 @@ void settings_dialog()
else if (id==20) show_dev_name ^= 1; else if (id==20) show_dev_name ^= 1;
else if (id==21) real_files_names_case ^= 1; else if (id==21) real_files_names_case ^= 1;
else if (id==22) info_after_copy ^= 1; else if (id==22) info_after_copy ^= 1;
else if (id==23) use_big_fonts ^= 1; else if (id==23) { use_big_fonts ^= 1; BigFontsChange(); }
else if (id==25) files.line_h++; else if (id==25) files.line_h++;
else if (id==26) && (files.line_h>14) files.line_h--; else if (id==26) && (files.line_h>14) files.line_h--;
else if (id==27) MOUSE_TIME++; else if (id==27) MOUSE_TIME++;
@ -136,21 +136,10 @@ void LoadIniSettings()
ini_get_int stdcall (eolite_ini_path, #confir_section, "UseBigFonts", 0); use_big_fonts = EAX; ini_get_int stdcall (eolite_ini_path, #confir_section, "UseBigFonts", 0); use_big_fonts = EAX;
ini_get_int stdcall (eolite_ini_path, #confir_section, "LineHeight", 18); files.line_h = EAX; ini_get_int stdcall (eolite_ini_path, #confir_section, "LineHeight", 18); files.line_h = EAX;
ini_get_int stdcall (eolite_ini_path, #confir_section, "TimeDoubleClick", 50); MOUSE_TIME = EAX; ini_get_int stdcall (eolite_ini_path, #confir_section, "TimeDoubleClick", 50); MOUSE_TIME = EAX;
BigFontsChange();
if (use_big_fonts)
{
font_type = 0x90;
PathShow.font_size_x = FileShow.font_size_x = 8;
PathShow.font_number = FileShow.font_number = 1;
}
else
{
font_type=0x80;
PathShow.font_size_x = FileShow.font_size_x = 8;
PathShow.font_number = FileShow.font_number = 0;
}
} }
void SaveIniSettings() void SaveIniSettings()
{ {
ini_set_int stdcall (eolite_ini_path, #confir_section, "ShowDeviceName", show_dev_name); ini_set_int stdcall (eolite_ini_path, #confir_section, "ShowDeviceName", show_dev_name);
@ -187,6 +176,25 @@ void SetAppColors()
} }
void BigFontsChange()
{
if (use_big_fonts)
{
font_type = 10110000b;
font_h = 14;
FileShow.font_size_x = 8;
FileShow.font_number = 3;
}
else
{
font_type=10000000b;
font_h = 6;
FileShow.font_size_x = 6;
FileShow.font_number = 0;
}
}
void CheckBox2(dword x, y, id, text, byte value) { void CheckBox2(dword x, y, id, text, byte value) {
CheckBox(x, y, 14, 14, id, text, system.color.work_graph, system.color.work_text, value); CheckBox(x, y, 14, 14, id, text, system.color.work_graph, system.color.work_text, value);
} }