From d04f47d3351e4f7468b4afd280d62cde6671b9cc Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sun, 4 Dec 2016 16:50:34 +0000 Subject: [PATCH] cmm: bigger menu, Eolite: refrash folder on window redraw, fix breadcrumbs click git-svn-id: svn://kolibrios.org@6782 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/appearance/appearance.c | 2 +- programs/cmm/browser/WebView.c | 11 +++++++---- programs/cmm/eolite/Eolite.c | 1 + programs/cmm/eolite/include/breadcrumbs.h | 3 ++- programs/cmm/examples/menu.c | 4 ++-- programs/cmm/lib/menu.h | 6 +++--- 6 files changed, 16 insertions(+), 11 deletions(-) diff --git a/programs/cmm/appearance/appearance.c b/programs/cmm/appearance/appearance.c index c4887c1a3b..5b56a63bfd 100644 --- a/programs/cmm/appearance/appearance.c +++ b/programs/cmm/appearance/appearance.c @@ -71,7 +71,7 @@ void main() if (mouse.down)&&(mouse.pkm) { select_list.ProcessMouse(mouse.x, mouse.y); SelectList_Draw(); - menu.show(Form.left+mouse.x, Form.top+mouse.y+skin_height, 136, "Open file Enter\nDelete Del", 10); + menu.show(Form.left+mouse.x, Form.top+mouse.y+skin_height, 185, "Open file Enter\nDelete Del", 10); } break; diff --git a/programs/cmm/browser/WebView.c b/programs/cmm/browser/WebView.c index 1ac9f5e331..e0779b7bf6 100644 --- a/programs/cmm/browser/WebView.c +++ b/programs/cmm/browser/WebView.c @@ -136,7 +136,7 @@ void main() { PageLinks.Hover(mouse.x, WB1.list.first*WB1.list.item_h + mouse.y, link_color_inactive, link_color_active, bg_color); if (bufsize) && (mouse.pkm) && (mouse.up) { - menu.show(Form.left+mouse.x-6,Form.top+mouse.y+skin_height+3, 180, #rmb_menu, VIEW_SOURCE); + EventShowMenu(mouse.x, mouse.y); break; } if (WB1.list.MouseScroll(mouse.vert)) WB1.DrawPage(); @@ -342,9 +342,7 @@ void ProcessEvent(dword id__) else OpenPage(); return; case SANDWICH_BUTTON: - mouse.y = TOOLBAR_H-6; - mouse.x = Form.cwidth - 167; - menu.show(Form.left+mouse.x-6,Form.top+mouse.y+skin_height+3, 180, #rmb_menu, VIEW_SOURCE); + EventShowMenu(Form.cwidth - 215, TOOLBAR_H-6); return; case VIEW_SOURCE: WB1.list.first = 0; @@ -576,4 +574,9 @@ void ClickLink() OpenPage(); } +void EventShowMenu(dword _left, _top) +{ + menu.show(Form.left+_left-6,Form.top+_top+skin_height+3, 220, #rmb_menu, VIEW_SOURCE); +} + stop: \ No newline at end of file diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 5f97ed9f07..5b6e395c6d 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -542,6 +542,7 @@ void draw_window() llist_copy(#files_active, #files); strcpy(#active_path, #path); DrawStatusBar(); + Open_Dir(#path,ONLY_OPEN); DrawFilePanels(); if (del_active) Del_Form(); if (new_element_active) NewElement_Form(new_element_active, #new_element_name); diff --git a/programs/cmm/eolite/include/breadcrumbs.h b/programs/cmm/eolite/include/breadcrumbs.h index 80a9efb130..2fbab9f3b8 100644 --- a/programs/cmm/eolite/include/breadcrumbs.h +++ b/programs/cmm/eolite/include/breadcrumbs.h @@ -28,6 +28,7 @@ void DrawBreadCrumbs() breadCrumb.add(i+1); } } + breadCrumb.add(i+1); btn.set_size(246,10,NULL,20); area_w = Form.cwidth - btn.x - 20; for (i=0; i