mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-25 02:09:36 +03:00
Eolite 3.0 RC2: over 100500 issues related to two paneled interface were fixed
git-svn-id: svn://kolibrios.org@5723 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
35f6e3767b
commit
47deb262f3
@ -233,9 +233,9 @@ void main()
|
||||
break;
|
||||
}
|
||||
|
||||
if (mouse.x>=Form.width-26) && (mouse.x<=Form.width-6) && (mouse.y>40) && (mouse.y<files.y)
|
||||
if (mouse.x>=files.x+files.w) && (mouse.x<=files.x+files.w+16) && (mouse.y>files.y-17) && (mouse.y<files.y)
|
||||
{
|
||||
if (mouse.lkm==1) DrawRectangle3D(Form.cwidth - 17,41,14,14,0xC7C7C7,0xFFFFFF);
|
||||
if (mouse.lkm==1) DrawRectangle3D(files.x+files.w+1,files.y-16,14,14,0xC7C7C7,0xFFFFFF);
|
||||
WHILE (mouse.lkm==1) && (files.first>0)
|
||||
{
|
||||
pause(8);
|
||||
@ -243,12 +243,12 @@ void main()
|
||||
List_ReDraw();
|
||||
mouse.get();
|
||||
}
|
||||
DrawRectangle3D(Form.cwidth - 17,41,14,14,0xFFFFFF,0xC7C7C7);
|
||||
DrawRectangle3D(files.x+files.w+1,files.y-16,14,14,0xFFFFFF,0xC7C7C7);
|
||||
}
|
||||
|
||||
if (mouse.x>=Form.width-26) && (mouse.x<=Form.width-6) && (mouse.y>onTop(22,0)+1) && (mouse.y<onTop(22,0)+16)
|
||||
if (mouse.x>=files.x+files.w) && (mouse.x<=files.x+files.w+16) && (mouse.y>files.y+files.h-16) && (mouse.y<files.y+files.h)
|
||||
{
|
||||
if (mouse.lkm==1) DrawRectangle3D(Form.cwidth - 17,onTop(21,0),14,14,0xC7C7C7,0xFFFFFF);
|
||||
if (mouse.lkm==1) DrawRectangle3D(files.x+files.w+1,files.y+files.h-15,14,14,0xC7C7C7,0xFFFFFF);
|
||||
while (mouse.lkm==1) && (files.first<files.count-files.visible)
|
||||
{
|
||||
pause(8);
|
||||
@ -256,20 +256,19 @@ void main()
|
||||
List_ReDraw();
|
||||
mouse.get();
|
||||
}
|
||||
DrawRectangle3D(Form.cwidth - 17,onTop(21,0),14,14,0xFFFFFF,0xC7C7C7);
|
||||
DrawRectangle3D(files.x+files.w+1,files.y+files.h-15,14,14,0xFFFFFF,0xC7C7C7);
|
||||
}
|
||||
|
||||
//Scrooll
|
||||
if (!mouse.lkm) && (scroll_used) { scroll_used=false; Scroll(); }
|
||||
if (mouse.x>=files.x+files.w) && (mouse.x<=files.x+files.w+18) && (mouse.y>files.y) && (mouse.y<files.y+files.y-18) && (mouse.lkm) && (!scroll_used) {scroll_used=true; Scroll();}
|
||||
if (mouse.x>=files.x+files.w) && (mouse.x<=files.x+files.w+18) && (mouse.y>files.y) && (mouse.y<files.y+files.h-18) && (mouse.lkm) && (!scroll_used) {scroll_used=true; Scroll();}
|
||||
|
||||
if (scroll_used)
|
||||
{
|
||||
if (sc_slider_h/2+files.y>mouse.y) || (mouse.y<0) || (mouse.y>4000) mouse.y=sc_slider_h/2+files.y; //anee eo?ni? iaa ieiii
|
||||
id=files.first;
|
||||
j= sc_slider_h/2;
|
||||
files.first = mouse.y -j -files.y * files.count;
|
||||
files.first /= onTop(22,files.y);
|
||||
id = files.first;
|
||||
files.first = -sc_slider_h / 2 + mouse.y -j -files.y * files.count;
|
||||
files.first /= Form.cheight - 18 - files.y;
|
||||
if (files.visible+files.first>files.count) files.first=files.count-files.visible;
|
||||
if (id!=files.first) List_ReDraw();
|
||||
break;
|
||||
@ -281,13 +280,7 @@ void main()
|
||||
if (active_panel!=1)
|
||||
{
|
||||
active_panel = 1;
|
||||
active_current = inactive_current;
|
||||
inactive_current = files.current;
|
||||
active_first = inactive_first;
|
||||
inactive_first = files.first;
|
||||
strcpy(#active_path, #inactive_path);
|
||||
strcpy(#inactive_path, #path);
|
||||
draw_window();
|
||||
goto __SET_VALS_AND_DRAW;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -295,13 +288,14 @@ void main()
|
||||
if (active_panel!=2)
|
||||
{
|
||||
active_panel = 2;
|
||||
__SET_VALS_AND_DRAW:
|
||||
active_current = inactive_current;
|
||||
inactive_current = files.current;
|
||||
active_first = inactive_first;
|
||||
inactive_first = files.first;
|
||||
strcpy(#active_path, #inactive_path);
|
||||
strcpy(#inactive_path, #path);
|
||||
draw_window();
|
||||
DrawFilePanels();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -397,8 +391,11 @@ void main()
|
||||
key_scancode -= 59;
|
||||
if (key_scancode<disc_num)
|
||||
{
|
||||
DrawRectangle(17,key_scancode*16+74,159,16, 0); //display click
|
||||
pause(7);
|
||||
if (!two_panels)
|
||||
{
|
||||
DrawRectangle(17,key_scancode*16+74,159,16, 0); //display click
|
||||
pause(7);
|
||||
}
|
||||
ClickOnDisk(key_scancode);
|
||||
}
|
||||
break;
|
||||
@ -555,10 +552,32 @@ void draw_window()
|
||||
//main rectangles
|
||||
DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42,system.color.work_graph);
|
||||
DrawRectangle(0,39,Form.cwidth-1,Form.cheight - 40,col_palette[4]); //bg
|
||||
for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]);
|
||||
for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]);
|
||||
active_current = files.current;
|
||||
active_first = files.first;
|
||||
strcpy(#active_path, #path);
|
||||
DrawFilePanels();
|
||||
if (del_active) Del_Form();
|
||||
if (new_element_active) NewElement_Form(new_element_active, #new_element_name);
|
||||
}
|
||||
|
||||
void DrawList()
|
||||
{
|
||||
DrawFlatButton(files.x,files.y - 17, files.w - 141,16,31,system.color.work,T_FILE);
|
||||
DrawFlatButton(files.x + files.w - 141, files.y-17,73,16,32,system.color.work,T_TYPE);
|
||||
DrawFlatButton(files.x + files.w - 68, files.y-17,68,16,33,system.color.work,T_SIZE);
|
||||
DrawFlatButton(files.x + files.w, files.y-17,16,16, 0,system.color.work,"\x18");
|
||||
DrawFlatButton(files.x + files.w,files.y+files.h-16,16,16, 0,system.color.work,"\x19");
|
||||
DrawBar(files.x+files.w,files.y,1,files.h,system.color.work_graph);
|
||||
if (two_panels) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,system.color.work_graph);
|
||||
Open_Dir(#path,WITH_REDRAW);
|
||||
}
|
||||
|
||||
void DrawFilePanels()
|
||||
{
|
||||
if (!two_panels)
|
||||
{
|
||||
DrawLeftPanel();
|
||||
DrawDeviceAndActionsLeftPanel();
|
||||
files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59, files.line_h);
|
||||
DrawList();
|
||||
}
|
||||
@ -591,19 +610,6 @@ void draw_window()
|
||||
DrawList();
|
||||
}
|
||||
}
|
||||
if (del_active) Del_Form();
|
||||
if (new_element_active) NewElement_Form(new_element_active, #new_element_name);
|
||||
}
|
||||
|
||||
void DrawList()
|
||||
{
|
||||
DrawFlatButton(files.x,files.y - 17, files.w - 141,16,31,system.color.work,T_FILE);
|
||||
DrawFlatButton(files.x + files.w - 141, files.y-17,73,16,32,system.color.work,T_TYPE);
|
||||
DrawFlatButton(files.x + files.w - 68, files.y-17,68,16,33,system.color.work,T_SIZE);
|
||||
DrawFlatButton(files.x + files.w, files.y-17,16,16, 0,system.color.work,"\x18");
|
||||
DrawFlatButton(files.x + files.w,files.y+files.h-16,16,16, 0,system.color.work,"\x19");
|
||||
DrawBar(files.x+files.w,files.y,1,files.h,system.color.work_graph);
|
||||
Open_Dir(#path,WITH_REDRAW);
|
||||
}
|
||||
|
||||
|
||||
@ -1088,7 +1094,7 @@ void FnProcess(byte N)
|
||||
case 5: //refresh cur dir & devs
|
||||
if (two_panels)
|
||||
{
|
||||
draw_window();
|
||||
DrawFilePanels();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1098,7 +1104,7 @@ void FnProcess(byte N)
|
||||
LoadIniSettings();
|
||||
GetSystemDiscs();
|
||||
Open_Dir(#path,WITH_REDRAW);
|
||||
DrawLeftPanel();
|
||||
DrawDeviceAndActionsLeftPanel();
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
|
@ -55,7 +55,7 @@ void about_dialog()
|
||||
if (Form.status_window>2) break;
|
||||
DrawBar(0,0,about_form.cwidth,50,0x8494C4);
|
||||
PutPaletteImage(#logo,85,85,about_form.cwidth/2-43,7,8,#logo_pal);
|
||||
WriteTextB(about_form.cwidth/2-66,100,0x81,0xBF40BF,ABOUT_TITLE);
|
||||
WriteTextB(-strlen(ABOUT_TITLE)*12+about_form.cwidth/2,100,0x81,0xBF40BF,ABOUT_TITLE);
|
||||
WriteTextCenter(0,130,about_form.cwidth,0,INTRO_TEXT_2);
|
||||
WriteTextCenter(0,143,about_form.cwidth,0,"Leency Veliant PunkJoker Pavelyakov");
|
||||
WriteTextCenter(0,156,about_form.cwidth,0,"KolibriOS Team");
|
||||
|
@ -181,11 +181,11 @@ void DrawSystemDiscs()
|
||||
else
|
||||
{
|
||||
pos_y = 43;
|
||||
DrawBar(pos_x, pos_y, strlen(#dev_name)*6 + 37, 17, 0xFFFFFF);
|
||||
DefineButton(pos_x+2, pos_y, strlen(#dev_name)*6 + 33, 16, 100+i+BT_HIDE,0xFFFFFF);
|
||||
DrawBar(pos_x, pos_y, strlen(#dev_name)*6 + 29, 17, 0xFFFFFF);
|
||||
DefineButton(pos_x+2, pos_y, strlen(#dev_name)*6 + 25, 16, 100+i+BT_HIDE,0xFFFFFF);
|
||||
_PutImage(pos_x + 5, pos_y, 18,17, is_active*6+dev_icon*17*18*3+#devices);
|
||||
WriteText(pos_x + 24, pos_y+5, 0x80, 0, #dev_name);
|
||||
pos_x += strlen(#dev_name)*6 + 37;
|
||||
pos_x += strlen(#dev_name)*6 + 29;
|
||||
}
|
||||
}
|
||||
if (two_panels)
|
||||
@ -193,6 +193,8 @@ void DrawSystemDiscs()
|
||||
DrawBar(pos_x, pos_y, Form.cwidth - pos_x - 2, 17, 0xFFFFFF);
|
||||
DrawBar(2, pos_y-2, Form.cwidth - 4, 2, 0xFFFFFF);
|
||||
DrawBar(2, pos_y+17, Form.cwidth - 4, 2, 0xFFFFFF);
|
||||
DefineButton(Form.cwidth - 23, pos_y, 17,16, 60+BT_HIDE, 0xCCCccc);
|
||||
_PutImage(Form.cwidth - 21, pos_y+2, 14,13, 2*14*13*3+#factions);
|
||||
}
|
||||
}
|
||||
|
||||
@ -234,7 +236,7 @@ void DrawLeftPanelBg()
|
||||
}
|
||||
|
||||
|
||||
void DrawLeftPanel()
|
||||
void DrawDeviceAndActionsLeftPanel()
|
||||
{
|
||||
Tip(56, T_DEVICES, 55, "=");
|
||||
DrawSystemDiscs();
|
||||
|
@ -54,6 +54,7 @@ void FileMenu()
|
||||
int index;
|
||||
|
||||
menu.ClearList();
|
||||
menu.SetFont(6, 9, 0x80);
|
||||
menu.SetSizes(0,0,10,0,18);
|
||||
for (index=0; file_captions[index]!=0; index+=3)
|
||||
{
|
||||
@ -62,8 +63,8 @@ void FileMenu()
|
||||
menu.count++;
|
||||
menu.visible++;
|
||||
}
|
||||
menu.w = menu.w + 3 * 6 + 50;
|
||||
menu.h = menu.count*menu.line_h;
|
||||
menu.w = menu.w + 3 * menu.font_w + 50;
|
||||
menu.h = menu.count * menu.line_h;
|
||||
SetEventMask(100111b);
|
||||
goto _MENU_DRAW;
|
||||
|
||||
@ -110,10 +111,10 @@ void MenuListRedraw()
|
||||
else
|
||||
{
|
||||
DrawBar(2,start_y+2,menu.w-1,menu.line_h,system.color.work);
|
||||
WriteText(8,start_y+menu.text_y+3,0x80,0xf2f2f2,file_captions[index*3]);
|
||||
WriteText(8,start_y+menu.text_y+4,menu.font_type,0xf2f2f2,file_captions[index*3]);
|
||||
}
|
||||
WriteText(7,start_y+menu.text_y+2,0x80,system.color.work_text,file_captions[index*3]);
|
||||
WriteText(-strlen(file_captions[index*3+1])*6-6+menu.w,start_y+menu.text_y+2,0x80,0x888888,file_captions[index*3+1]);
|
||||
WriteText(7, start_y + menu.text_y + 3, menu.font_type, system.color.work_text, file_captions[index*3]);
|
||||
WriteText(-strlen(file_captions[index*3+1])-1*menu.font_w + menu.w, start_y + menu.text_y + 3, menu.font_type, 0x888888, file_captions[index*3+1]);
|
||||
start_y+=menu.line_h;
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
#define TITLE "Eolite File Manager v3.0 RC1"
|
||||
#define ABOUT_TITLE "Eolite 3.0 RC1"
|
||||
#define TITLE "Eolite File Manager v3.0 RC2"
|
||||
#define ABOUT_TITLE "Eolite 3.0 RC2"
|
||||
|
||||
#ifdef LANG_RUS
|
||||
?define T_FILE "” ©«"
|
||||
|
Loading…
Reference in New Issue
Block a user