forked from KolibriOS/kolibrios
Eolite: fix menu bug, remove min_h from llist.h
git-svn-id: svn://kolibrios.org@5709 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
8f52c43d64
commit
3372b13bc3
programs/cmm
Calypte
appearance
browser
eolite
lib
liza
pixie
@ -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);
|
||||
|
||||
|
@ -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; i<list_last; i++;)
|
||||
@ -152,8 +152,8 @@ void main()
|
||||
list[SKINS].current = list[WALLPAPERS].current = -1;
|
||||
list[SKINS].first = list[WALLPAPERS].first = 0;
|
||||
TabClick(WALLPAPERS);
|
||||
list[WALLPAPERS].SetSizes(0, 230, 350, 400-PANEL_H, 40, 18);
|
||||
list[SKINS].SetSizes(0, 230, 350, 400-PANEL_H, 40, 18);
|
||||
list[WALLPAPERS].SetSizes(0, 230, 350, 400-PANEL_H, 18);
|
||||
list[SKINS].SetSizes(0, 230, 350, 400-PANEL_H, 18);
|
||||
loop()
|
||||
{
|
||||
switch(WaitEvent())
|
||||
|
@ -285,7 +285,7 @@ void SetElementSizes()
|
||||
address_box.top = TOOLBAR_H-TAB_H/2-7+TAB_H;
|
||||
address_box.width = Form.cwidth - address_box.left - 25 - 22;
|
||||
WB1.list.SetSizes(0, TOOLBAR_H, Form.width - 10 - scroll_wv.size_x / WB1.DrawBuf.zoom,
|
||||
Form.cheight - TOOLBAR_H - STATUSBAR_H, 0, 11*WB1.DrawBuf.zoom);
|
||||
Form.cheight - TOOLBAR_H - STATUSBAR_H, 11*WB1.DrawBuf.zoom);
|
||||
WB1.list.column_max = WB1.list.w - scroll_wv.size_x / 6;
|
||||
WB1.list.visible = WB1.list.h - 5 / WB1.list.line_h;
|
||||
WB1.DrawBuf.Init(WB1.list.x, WB1.list.y, WB1.list.w, WB1.list.line_h);
|
||||
|
@ -31,7 +31,7 @@ void menu_rmb()
|
||||
|
||||
menu.first = menu.current = 0;
|
||||
while (ITEMS_LIST[menu.count*2]) menu.count++;
|
||||
menu.SetSizes(2,2,177,menu.count*19,0,19);
|
||||
menu.SetSizes(2,2,177,menu.count*19,19);
|
||||
SetEventMask(100111b);
|
||||
|
||||
_BEGIN_APPLICATION_MENU:
|
||||
|
@ -214,6 +214,7 @@ void main()
|
||||
if (files.MouseOver(mouse.x, mouse.y))
|
||||
{
|
||||
files.current = mouse.y - files.y / files.line_h + files.first;
|
||||
List_ReDraw();
|
||||
menu_stak = malloc(4096);
|
||||
CreateThread(#FileMenu,menu_stak+4092);
|
||||
}
|
||||
@ -508,8 +509,8 @@ void draw_window()
|
||||
DefineAndDrawWindow(GetScreenWidth()-550/4+rand_n,rand_n+30,550,500,0x73,system.color.work,TITLE,0);
|
||||
GetProcessInfo(#Form, SelfInfo);
|
||||
if (Form.status_window>2) 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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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 "” ©«"
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,7 @@ void MailBoxLoop() {
|
||||
&& (!scroll1.delta2) && (!scroll_wv.delta2) panels_drag = 1;
|
||||
if (panels_drag)
|
||||
{
|
||||
if (mouse.y<mail_list.y+mail_list.min_h) || (mouse.y>Form.cheight-WB1.list.min_h-status_bar_h-LIST_INFO_H) break;
|
||||
if (mouse.y<mail_list.y+60) || (mouse.y>Form.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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user