From 3372b13bc31f3453685adcf1107a3e1675f33ce7 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Mon, 10 Aug 2015 12:06:47 +0000 Subject: [PATCH] Eolite: fix menu bug, remove min_h from llist.h git-svn-id: svn://kolibrios.org@5709 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/Calypte/Calypte.c | 2 +- programs/cmm/appearance/appearance.c | 8 ++++---- programs/cmm/browser/WebView.c | 2 +- programs/cmm/browser/menu_rmb.h | 2 +- programs/cmm/eolite/Eolite.c | 11 ++++++----- programs/cmm/eolite/include/menu.h | 2 +- programs/cmm/eolite/include/translations.h | 4 ++-- programs/cmm/lib/list_box.h | 9 +++------ programs/cmm/liza/mail_box.c | 6 +++--- programs/cmm/pixie/pixie.c | 2 +- 10 files changed, 23 insertions(+), 25 deletions(-) diff --git a/programs/cmm/Calypte/Calypte.c b/programs/cmm/Calypte/Calypte.c index 1660737302..ac69c2317b 100644 --- a/programs/cmm/Calypte/Calypte.c +++ b/programs/cmm/Calypte/Calypte.c @@ -234,7 +234,7 @@ void draw_window() DefineAndDrawWindow(GetScreenWidth()-WIN_W/2,GetScreenHeight()-WIN_H/2,WIN_W,WIN_H,0x73,0xFFFFFF,#win_title); GetProcessInfo(#Form, SelfInfo); if (Form.status_window>2) return; - tview.SetSizes(0, TOPPANELH, Form.cwidth, Form.cheight-BOTPANELH-TOPPANELH, 200, 12); + tview.SetSizes(0, TOPPANELH, Form.cwidth, Form.cheight-BOTPANELH-TOPPANELH, 12); DrawBar(0, 0, Form.cwidth, TOPPANELH, system.color.work); DrawBar(0, Form.cheight-BOTPANELH, Form.cwidth, BOTPANELH, system.color.work); diff --git a/programs/cmm/appearance/appearance.c b/programs/cmm/appearance/appearance.c index 51a483d896..f076164242 100644 --- a/programs/cmm/appearance/appearance.c +++ b/programs/cmm/appearance/appearance.c @@ -69,8 +69,8 @@ void Draw_List() int i; int yyy; int list_last; - list[SKINS].SetSizes(0, PANEL_H, Form.cwidth-scroll1.size_x-1, Form.cheight-PANEL_H, 40, 20); - list[WALLPAPERS].SetSizes(0, PANEL_H, Form.cwidth-scroll1.size_x-1, Form.cheight-PANEL_H, 40, 20); + list[SKINS].SetSizes(0, PANEL_H, Form.cwidth-scroll1.size_x-1, Form.cheight-PANEL_H, 20); + list[WALLPAPERS].SetSizes(0, PANEL_H, Form.cwidth-scroll1.size_x-1, Form.cheight-PANEL_H, 20); if (list[active].count > list[active].visible) list_last = list[active].visible; else list_last = list[active].count; for (i=0; i2) return; - if (Form.height < files.min_h) MoveSize(OLD,OLD,OLD,files.min_h); - if (Form.width<480) MoveSize(OLD,OLD,480,OLD); + if (Form.height < 350) MoveSize(OLD,OLD,OLD,350); + if (Form.width < 480) MoveSize(OLD,OLD,480,OLD); GetProcessInfo(#Form, SelfInfo); //if win_size changed PutPaletteImage(#toolbar,246,34,0,0,8,#toolbar_pal); DrawBar(127, 8, 1, 25, system.color.work_graph); @@ -527,16 +528,16 @@ void draw_window() if (!two_panels) { DrawLeftPanel(); - files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59, disc_num*16+3,files.line_h); + files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59, files.line_h); DrawListColumns(); Open_Dir(#path,ONLY_SHOW); } else { - files.SetSizes(2, 57+22, Form.cwidth/2-2-17, Form.cheight-59-22, disc_num*16+3,files.line_h); + files.SetSizes(2, 57+22, Form.cwidth/2-2-17, Form.cheight-59-22, files.line_h); DrawListColumns(); Open_Dir(#path,ONLY_SHOW); - files.SetSizes(Form.cwidth/2, 57+22, Form.cwidth/2 -17, Form.cheight-59-22, disc_num*16+3,files.line_h); + files.SetSizes(Form.cwidth/2, 57+22, Form.cwidth/2 -17, Form.cheight-59-22, files.line_h); DrawListColumns(); Open_Dir(#path,ONLY_SHOW); } diff --git a/programs/cmm/eolite/include/menu.h b/programs/cmm/eolite/include/menu.h index 7f019561c9..d31c2fa2fa 100644 --- a/programs/cmm/eolite/include/menu.h +++ b/programs/cmm/eolite/include/menu.h @@ -54,7 +54,7 @@ void FileMenu() int index; menu.ClearList(); - menu.SetSizes(0,0,10,0,0,18); + menu.SetSizes(0,0,10,0,18); for (index=0; file_captions[index]!=0; index+=3) { if (itdir) && (file_captions[index+2]>=200) continue; diff --git a/programs/cmm/eolite/include/translations.h b/programs/cmm/eolite/include/translations.h index cc39d1a4d8..686ceee3b2 100644 --- a/programs/cmm/eolite/include/translations.h +++ b/programs/cmm/eolite/include/translations.h @@ -1,5 +1,5 @@ -#define TITLE "Eolite File Manager v3.0 beta 5" -#define ABOUT_TITLE "Eolite 3.0 beta 5" +#define TITLE "Eolite File Manager v3.0 beta 6" +#define ABOUT_TITLE "Eolite 3.0 beta 6" #ifdef LANG_RUS ?define T_FILE "” ©«" diff --git a/programs/cmm/lib/list_box.h b/programs/cmm/lib/list_box.h index adbcbf22e0..a4c1fd6e34 100644 --- a/programs/cmm/lib/list_box.h +++ b/programs/cmm/lib/list_box.h @@ -9,9 +9,8 @@ struct llist { - int x, y, w, h, min_h, line_h, text_y; - int column_max; - int count, visible, first, current; //visible = row_max + int x, y, w, h, line_h, char_w, char_h, text_y; + int count, visible, first, current, column_max; //visible = row_max int active; void ClearList(); int MouseOver(int xx, yy); @@ -47,17 +46,15 @@ void llist::ClearList() } -void llist::SetSizes(int xx, yy, ww, hh, min_hh, line_hh) +void llist::SetSizes(int xx, yy, ww, hh, line_hh) { x = xx; y = yy; w = ww; h = hh; - min_h = min_hh; line_h = line_hh; text_y = line_h / 2 - 4; visible = h / line_h; - column_max = w / 6; //if (visible > count) visible=count; } diff --git a/programs/cmm/liza/mail_box.c b/programs/cmm/liza/mail_box.c index 7a9851c9e0..a1a32f67ac 100644 --- a/programs/cmm/liza/mail_box.c +++ b/programs/cmm/liza/mail_box.c @@ -166,7 +166,7 @@ void MailBoxLoop() { && (!scroll1.delta2) && (!scroll_wv.delta2) panels_drag = 1; if (panels_drag) { - if (mouse.yForm.cheight-WB1.list.min_h-status_bar_h-LIST_INFO_H) break; + if (mouse.yForm.cheight-60-status_bar_h-LIST_INFO_H) break; mail_list.h = mouse.y - mail_list.y-2; DrawMailBox(); break; @@ -289,7 +289,7 @@ void DrawToolbar() { #define BUT_H 22 #define BUT_W 74 int toolbar_w = BUT_Y + BUT_H + BUT_Y + 3; - mail_list.SetSizes(0, toolbar_w, Form.cwidth - scroll1.size_x - 1, mail_list.h, 60,18); + mail_list.SetSizes(0, toolbar_w, Form.cwidth - scroll1.size_x - 1, mail_list.h, 18); DrawBar(0,0, Form.cwidth,toolbar_w-3, system.color.work); DrawCaptButton(10 , BUT_Y, BUT_W, BUT_H, GET_MAIL, system.color.work_button, system.color.work_button_text,"Get mail"); @@ -349,7 +349,7 @@ void DrawLetterInfo() { void InitTWB() { WB1.list.SetSizes(0, mail_list.y+mail_list.h+LIST_INFO_H+1, Form.cwidth - scroll_wv.size_x - 1, - Form.cheight - mail_list.y - mail_list.h - LIST_INFO_H - 1 - status_bar_h, 60, 12); + Form.cheight - mail_list.y - mail_list.h - LIST_INFO_H - 1 - status_bar_h, 12); WB1.list.column_max = WB1.list.w - 30 / 6; WB1.list.visible = WB1.list.h / WB1.list.line_h; WB1.DrawBuf.Init(WB1.list.x, WB1.list.y, WB1.list.w, WB1.list.h); diff --git a/programs/cmm/pixie/pixie.c b/programs/cmm/pixie/pixie.c index 47ef19ac95..aef20fa189 100644 --- a/programs/cmm/pixie/pixie.c +++ b/programs/cmm/pixie/pixie.c @@ -102,7 +102,7 @@ void main() } StartPlayingMp3(); - list.SetSizes(1, skin.h, skin.w-1, 198, 40, 18); + list.SetSizes(1, skin.h, skin.w-1, 198, 18); if (list.count <= list.visible) { list.h = list.count * list.line_h;