Eolite 3.9: Use big icons option

git-svn-id: svn://kolibrios.org@7242 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2018-04-18 14:07:12 +00:00
parent a488e6f97b
commit 3e7937bbbb
4 changed files with 52 additions and 19 deletions

View File

@ -104,14 +104,15 @@ bool show_dev_name=true,
two_panels=false,
show_breadcrumb=false,
show_status_bar=true,
active_panel=1;
active_panel=1,
big_icons=false;
//} settings;
libimg_image icons16_default;
libimg_image icons16_selected;
//libimg_image icons32_default;
//libimg_image icons32_selected;
libimg_image icons32_default;
libimg_image icons32_selected;
#define STATUS_BAR_H 16;
int status_bar_h = 0;
@ -159,11 +160,6 @@ void main()
Libimg_ReplaceColor(icons16_selected.image, icons16_selected.w, icons16_selected.h, 0xffFFFfff, col_selec);
Libimg_ReplaceColor(icons16_selected.image, icons16_selected.w, icons16_selected.h, 0xffCACBD6, MixColors(col_selec, 0, 200));
//Libimg_LoadImage(#icons32_default, "/sys/icons32.png");
//Libimg_LoadImage(#icons32_selected, "/sys/icons32.png");
//Libimg_ReplaceColor(icons32_selected.image, icons32_selected.w, icons32_selected.h, 0xffFFFfff, 0xFF94AECE);
//Libimg_ReplaceColor(icons32_selected.image, icons32_selected.w, icons32_selected.h, 0xffCACBD6, 0xFF7692B5);
//-p just show file/folder properties dialog
if (param) && (param[0]=='-') && (param[1]=='p')
{

View File

@ -1,31 +1,45 @@
_ini icons = { "/sys/File managers/icons.ini", "icons16" };
_ini icons_ini = { "/sys/File managers/icons.ini", NULL };
void DrawIconByExtension(dword file_path, extension, xx, yy, fairing_color)
{
char BYTE_HEAD_FILE[4];
char ext[512];
int i;
dword icon_n=2; // set default icon
dword icon_n;
dword selected_image;
dword default_image;
if (big_icons) {
icons_ini.section = "icons32";
selected_image = icons32_selected.image;
default_image = icons32_default.image;
}
else {
icons_ini.section = "icons16";
selected_image = icons16_selected.image;
default_image = icons16_default.image;
}
if (extension)
{
strcpy(#ext, extension);
strlwr(#ext);
icon_n = icons.GetInt(#ext, 2);
icon_n = icons_ini.GetInt(#ext, 2);
}
else if (file_path)
{
ReadFile(0,4,#BYTE_HEAD_FILE,file_path);
IF(DSDWORD[#BYTE_HEAD_FILE]=='KCPK')||(DSDWORD[#BYTE_HEAD_FILE]=='UNEM') icon_n = icons.GetInt("kex", 2);
IF(DSDWORD[#BYTE_HEAD_FILE]=='KCPK')||(DSDWORD[#BYTE_HEAD_FILE]=='UNEM')
icon_n = icons_ini.GetInt("kex", 2);
}
if (fairing_color==col_selec)
{
img_draw stdcall(icons16_selected.image, xx, yy, icon_size, icon_size, 0, icon_n*icon_size);
IconFairing(icon_n, xx, yy, fairing_color);
img_draw stdcall(selected_image, xx, yy, icon_size, icon_size, 0, icon_n*icon_size);
if (!big_icons) IconFairing(icon_n, xx, yy, fairing_color);
}
else
{
img_draw stdcall(icons16_default.image, xx, yy, icon_size, icon_size, 0, icon_n*icon_size);
img_draw stdcall(default_image, xx, yy, icon_size, icon_size, 0, icon_n*icon_size);
}
}

View File

@ -6,6 +6,7 @@
?define SHOW_STATUS_BAR "<EFBFBD>®ª §ë¢ âì áâ âãá ¡ à"
?define NOTIFY_COPY_END "“¢¥¤®¬«ïâì ® § ¢¥à襭¨¨ ª®¯¨à®¢ ­¨ï"
?define SHOW_BREADCRUMBS "ˆá¯®«ì§®¢ âì 'å«¥¡­ë¥ ªà®èª¨'"
?define BIG_ICONS "ˆá¯®«ì§®¢ âì ¡®«ì訥 ¨ª®­ª¨"
?define USE_TWO_PANELS "„¢¥ ¯ ­¥«¨"
?define FONT_SIZE_LABEL "<EFBFBD> §¬¥à èà¨äâ "
?define LIST_LINE_HEIGHT "‚ëá®â  áâப¨ ¢ ᯨ᪥"
@ -20,6 +21,7 @@
?define SHOW_STATUS_BAR "Show status bar"
?define NOTIFY_COPY_END "Notify when copying finished"
?define SHOW_BREADCRUMBS "Show breadcrumbs"
?define BIG_ICONS "Big icons in list"
?define USE_TWO_PANELS "Two panels"
?define FONT_SIZE_LABEL "Font size"
?define LIST_LINE_HEIGHT "List line height"
@ -80,6 +82,26 @@ void settings_dialog()
else if (id==27) show_status_bar ^= 1;
else if (id==30) { kfont.size.pt++; IF(!kfont.changeSIZE()) kfont.size.pt--; BigFontsChange(); }
else if (id==31) { kfont.size.pt--; IF(!kfont.changeSIZE()) kfont.size.pt++; BigFontsChange(); }
else if (id==33) {
big_icons ^= 1;
if (big_icons) {
icon_size=32;
files.item_h=34;
if (!icons32_default.image)
{
Libimg_LoadImage(#icons32_default, "/sys/icons32.png");
Libimg_LoadImage(#icons32_selected, "/sys/icons32.png");
Libimg_ReplaceColor(icons32_default.image, icons32_selected.w,
icons32_selected.h, 0x00000000, 0xffFFFfff);
Libimg_ReplaceColor(icons32_selected.image, icons32_selected.w,
icons32_selected.h, 0x00000000, col_selec);
}
}
else {
icon_size=16;
files.item_h=18;
}
}
EventRedrawWindow(Form.left,Form.top);
break;
@ -91,8 +113,8 @@ void settings_dialog()
break;
case evReDraw:
DefineAndDrawWindow(Form.cwidth-300/2+Form.left, Form.cheight-292/2+Form.top, 380,
390+skin_height,0x34,system.color.work,TITLE_SETT,0);
DefineAndDrawWindow(Form.cwidth-300/2+Form.left, Form.cheight-292/2+Form.top, 400,
410+skin_height,0x34,system.color.work,TITLE_SETT,0);
DrawSettingsCheckBoxes();
}
}
@ -116,6 +138,7 @@ void DrawSettingsCheckBoxes()
CheckBox(x, y.inc(25), 27, SHOW_STATUS_BAR, show_status_bar);
CheckBox(x, y.inc(25), 22, NOTIFY_COPY_END, info_after_copy);
CheckBox(x, y.inc(25), 32, SHOW_BREADCRUMBS, show_breadcrumb);
CheckBox(x, y.inc(25), 33, BIG_ICONS, big_icons);
CheckBox(x, y.inc(25), 24, USE_TWO_PANELS, two_panels);
MoreLessBox(x, y.inc(31), 30, 31, kfont.size.pt, FONT_SIZE_LABEL);
MoreLessBox(x, y.inc(31), 25, 26, files.item_h, LIST_LINE_HEIGHT);

View File

@ -1,5 +1,5 @@
#define TITLE "Eolite File Manager v3.85"
#define ABOUT_TITLE "EOLITE 3.85"
#define TITLE "Eolite File Manager v3.9"
#define ABOUT_TITLE "EOLITE 3.9"
#ifdef LANG_RUS
?define T_FILE "” ©«"