From b57726e4bc2905e5bdfcf4c2be86e73e30c92cee Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Thu, 10 Jun 2021 11:18:19 +0000 Subject: [PATCH] cmm: various size of icons support git-svn-id: svn://kolibrios.org@8789 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/eolite/Eolite.c | 6 +++--- programs/cmm/eolite/include/settings.h | 4 ++-- programs/cmm/lib/obj/libimg.h | 2 +- programs/cmm/lib/patterns/toolbar_button.h | 3 ++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 0ff0457f69..9496289701 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -3,8 +3,8 @@ // 70.5 - get volume info and label -#define TITLE "Eolite File Manager 4.65" -#define ABOUT_TITLE "EOLITE 4.65" +#define TITLE "Eolite File Manager 4.66" +#define ABOUT_TITLE "EOLITE 4.66" #ifndef AUTOBUILD #include "lang.h--" @@ -831,7 +831,7 @@ void Line_ReDraw(dword bgcol, filenum){ { if (Form.width>=480) { - FileShow.start_x = files.x + 23; + FileShow.start_x = files.x + icon_size + 7; FileShow.font_color = text_col; FileShow.area_size_x = files.w - 164; FileShow.text_pointer = file_name_off; diff --git a/programs/cmm/eolite/include/settings.h b/programs/cmm/eolite/include/settings.h index 40d88e30de..c8b22ebc4c 100644 --- a/programs/cmm/eolite/include/settings.h +++ b/programs/cmm/eolite/include/settings.h @@ -291,10 +291,10 @@ void BigFontsChange() void BigIconsSwitch() { if (big_icons.checked) { - icon_size=32; + icon_size = 32; LoadIcons(); } else { - icon_size=16; + icon_size = icons16_default.w; } BigFontsChange(); } diff --git a/programs/cmm/lib/obj/libimg.h b/programs/cmm/lib/obj/libimg.h index 219aae0539..82ea5cae2d 100644 --- a/programs/cmm/lib/obj/libimg.h +++ b/programs/cmm/lib/obj/libimg.h @@ -271,7 +271,7 @@ struct libimg_image if (DSDWORD[ESI]==0xffCACBD6) DSDWORD[ESI] = bgshadow; } } - img_draw stdcall(pure_img16, x, y, 16, 16, 0, icon_n*16); + img_draw stdcall(pure_img16, x, y, ESDWORD[EAX+4], ESDWORD[EAX+4], 0, icon_n*ESDWORD[EAX+4]); } #endif \ No newline at end of file diff --git a/programs/cmm/lib/patterns/toolbar_button.h b/programs/cmm/lib/patterns/toolbar_button.h index f17a7ed6fe..073110f479 100644 --- a/programs/cmm/lib/patterns/toolbar_button.h +++ b/programs/cmm/lib/patterns/toolbar_button.h @@ -23,7 +23,8 @@ unsigned int DrawTopPanelButton(dword _button_id, _x, _y, signed int _icon_n, bo DrawBar(_x+6, _y+5, 16, 16, semi_white); for (i=0; i<=2; i++) DrawBar(_x+6, i*5+_y+7, 15, 3, sc.work_graph); } else { - img_draw stdcall(top_icons.image, _x+6, _y+5+pressed, 16, 16, 0, _icon_n*16); + i = TSZE - top_icons.w / 2; //icon pos + img_draw stdcall(top_icons.image, _x+i+2, _y+i+1+pressed, top_icons.w, top_icons.w, 0, _icon_n*top_icons.w); } if (!pressed) {