Skip to content

Commit

Permalink
Some change in Dock All layout. (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredvs committed Nov 12, 2021
1 parent 5ec5ce4 commit d36ca01
Show file tree
Hide file tree
Showing 4 changed files with 4,043 additions and 4,036 deletions.
16 changes: 7 additions & 9 deletions src/main.mfm
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ object mainfo: tmainfo
visible = False
bounds_x = 411
bounds_y = 475
bounds_cx = 454
bounds_cx = 442
bounds_cy = 96
bounds_cxmin = 454
bounds_cxmin = 442
bounds_cymin = 40
bounds_cxmax = 468
bounds_cxmax = 442
bounds_cymax = 700
container.frame.framei_left = 0
container.frame.framei_top = 0
Expand All @@ -30,11 +30,8 @@ object mainfo: tmainfo
container.frame.optionsskin = [fso_flat]
container.frame.localprops = [frl_hiddenedges, frl_fileft, frl_fitop, frl_firight, frl_fibottom, frl_frameimagelist, frl_frameimageleft, frl_frameimagetop, frl_frameimageright, frl_frameimagebottom]
container.frame.localprops1 = []
container.frame.sbhorz.options = []
container.frame.sbhorz.width = 10
container.frame.sbhorz.face.localprops = []
container.frame.sbhorz.face.template = tfacecomp4
container.frame.sbhorz.facebutton.localprops = []
container.frame.sbhorz.facebutton.template = tfacebutgray
container.frame.sbvert.width = 10
container.frame.sbvert.face.localprops = []
container.frame.sbvert.face.template = tfacebutgray
Expand All @@ -47,7 +44,7 @@ object mainfo: tmainfo
container.bounds = (
0
17
454
442
79
)
mainmenu = tmainmenu1
Expand Down Expand Up @@ -205,7 +202,8 @@ object mainfo: tmainfo
bounds_cy = 21
statfile = tstatfile1
onchange = onchangevalcolor
value = 2
value = -1
valuemin = -1
valuemax = 10
reffontheight = 15
end
Expand Down
103 changes: 71 additions & 32 deletions src/main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,17 @@ procedure tmainfo.ontimerwait(const Sender: TObject);
//}

bounds_cxmax := 0;
bounds_cxmin := 0;

if not fileexists(tstatfile1.filename) then
top := 30;

if (fs_sbverton in container.frame.state) then
Width := fowidth + scrollwidth
else
else
Width := fowidth;

basedock.Width := Width;

hasinit := 1;

Expand All @@ -269,12 +272,18 @@ procedure tmainfo.ontimerwait(const Sender: TObject);

maxheightfo := rect1.cy - 70;

if bounds_cy < maxheightfo then
bounds_cymax := bounds_cy
if visiblecount = 1 then
begin
bounds_cymax := bounds_cy;
bounds_cymin := bounds_cy;
end
else
if visiblecount > 1 then
begin
bounds_cymax := maxheightfo;
bounds_cymin := bounds_cy;

bounds_cymin := 50 ;
end;

if dockpanel1fo.Visible then
dockpanel1fo.updatelayoutpan();

Expand All @@ -289,6 +298,8 @@ procedure tmainfo.ontimerwait(const Sender: TObject);

if dockpanel5fo.Visible then
dockpanel5fo.updatelayoutpan();

Visible := True;
end;
end;

Expand All @@ -311,7 +322,7 @@ procedure tmainfo.oncreateform(const Sender: TObject);
rect1: rectty;
begin
windowopacity := 0;

SetExceptionMask(GetExceptionMask + [exZeroDivide] + [exInvalidOp] +
[exDenormalized] + [exOverflow] + [exUnderflow] + [exPrecision]);

Expand All @@ -326,7 +337,7 @@ procedure tmainfo.oncreateform(const Sender: TObject);
'ini' + directoryseparator + 'stat.ini');

Timerwait := ttimer.Create(nil);
Timerwait.interval := 100000;
Timerwait.interval := 400000;
Timerwait.Enabled := False;
Timerwait.options := [to_single];
Timerwait.ontimer := @ontimerwait;
Expand Down Expand Up @@ -382,7 +393,6 @@ procedure tmainfo.oncreatedform(const Sender: TObject);
gl_Handle:TLibHandle=dynlibs.NilHandle;
{$ENDIF}
begin

{$IFDEF unix}
gl_Handle := DynLibs.SafeLoadLibrary('libGL.so.1');
// check if gl is installed
Expand All @@ -401,8 +411,6 @@ procedure tmainfo.oncreatedform(const Sender: TObject);

oktimer := 1;

Visible := True;

commanderfo.guimix.Value := False;

if not fileexists(tstatfile1.filename) then
Expand All @@ -414,7 +422,9 @@ procedure tmainfo.oncreatedform(const Sender: TObject);
{$endif}
// showall(Sender);
// ondockall(Sender);
typecolor.value := 2 ;
ondockplayersx2(Sender);

oktimer := 1;
end;

Expand Down Expand Up @@ -497,10 +507,11 @@ procedure tmainfo.oncreatedform(const Sender: TObject);
Inc(x);
end;


endlayout();

oktimer := 0;

if timerwait.Enabled then
timerwait.restart // to reset
else
Expand Down Expand Up @@ -603,6 +614,7 @@ procedure tmainfo.oncreatedform(const Sender: TObject);
randomnotefo.bringtofront;
randomnotefo.refreshform(Sender);
end;
//visible := false;

end;

Expand Down Expand Up @@ -655,10 +667,10 @@ procedure tmainfo.endlayout();
begin
Dec(flayoutlock);
basedock.dragdock.endplacement();
if flayoutlock = 0 then
updatelayoutstrum();

if timerwait.Enabled then
if ( hasinit = 1 ) and (flayoutlock = 0) then
updatelayoutstrum();
if timerwait.Enabled then
timerwait.restart // to reset
else
timerwait.Enabled := True;
Expand Down Expand Up @@ -3790,14 +3802,20 @@ // spect1.face.template := recorderfo.tfacerecorder;
begin

tchartleft.colorchart := cl_background;
tchartleft.traces[0].color := configfo.tcoloredit1.Value;
// tchartleft.traces[0].color := configfo.tcoloredit1.Value;
labelleft.font.color := ltblack;
tchartleft.color := cl_default;
tchartright.color := cl_default;
tchartright.colorchart := cl_background;
tchartright.traces[0].color := configfo.tcoloredit2.Value;
labelright.font.color := ltblack;
// tchartright.traces[0].color := configfo.tcoloredit2.Value;

tchartleft.traces[0].bar_face.fade_color.items[1] := configfo.tcoloredit1.Value;
tchartright.traces[0].bar_face.fade_color.items[1] := configfo.tcoloredit2.Value;
tchartleft.traces[0].bar_face.fade_color.items[0] := $F7F7F7;
tchartright.traces[0].bar_face.fade_color.items[0] := $F7F7F7;

labelright.font.color := ltblack;

fond.color := cl_default;

groupbox1.color := cl_default;
Expand All @@ -3813,15 +3831,20 @@ // spect1.face.template := recorderfo.tfacerecorder;
with spectrum2fo do
begin
tchartleft.colorchart := cl_background;
tchartleft.traces[0].color := configfo.tcoloredit12.Value;
// tchartleft.traces[0].color := configfo.tcoloredit12.Value;
labelleft.font.color := ltblack;

tchartleft.color := cl_default;
tchartright.color := cl_default;


tchartright.colorchart := cl_background;
tchartright.traces[0].color := configfo.tcoloredit22.Value;
//tchartright.traces[0].color := configfo.tcoloredit22.Value;

tchartleft.traces[0].bar_face.fade_color.items[1] := configfo.tcoloredit12.Value;
tchartright.traces[0].bar_face.fade_color.items[1] := configfo.tcoloredit22.Value;
tchartleft.traces[0].bar_face.fade_color.items[0] := $F7F7F7;
tchartright.traces[0].bar_face.fade_color.items[0] := $F7F7F7;

labelright.font.color := ltblack;
fond.color := cl_default;
groupbox1.color := cl_default;
Expand All @@ -3838,15 +3861,19 @@ // spect1.face.template := recorderfo.tfacerecorder;
with spectrumrecfo do
begin
tchartleft.colorchart := cl_background;
tchartleft.traces[0].color := $9A9A9A;
//tchartleft.traces[0].color := $9A9A9A;
labelleft.font.color := ltblack;

tchartleft.color := cl_default;
tchartright.color := cl_default;


tchartleft.traces[0].bar_face.fade_color.items[1] := $9A9A9A;
tchartright.traces[0].bar_face.fade_color.items[1] := $9A9A9A;
tchartleft.traces[0].bar_face.fade_color.items[0] := $F7F7F7;
tchartright.traces[0].bar_face.fade_color.items[0] := $F7F7F7;

tchartright.colorchart := cl_background;
tchartright.traces[0].color := $9A9A9A;
//tchartright.traces[0].color := $9A9A9A;
labelright.font.color := ltblack;
fond.color := cl_default;
groupbox1.color := cl_default;
Expand Down Expand Up @@ -4024,15 +4051,20 @@ // spect1.face.template := recorderfo.tfacerecorder;
// labelright.color := $3A3A3A;
tchartleft.color := $3A3A3A;
tchartleft.colorchart := $3A3A3A;
tchartleft.traces[0].color := configfo.tcoloredit1.Value;
//tchartleft.traces[0].color := configfo.tcoloredit1.Value;
labelleft.font.color := ltblank;

tchartleft.traces[0].bar_face.fade_color.items[1] := configfo.tcoloredit1.Value;
tchartright.traces[0].bar_face.fade_color.items[1] := configfo.tcoloredit2.Value;
tchartleft.traces[0].bar_face.fade_color.items[0] := $F7F7F7;
tchartright.traces[0].bar_face.fade_color.items[0] := $F7F7F7;

tchartleft.color := $3A3A3A;
tchartright.color := $3A3A3A;

tchartleft.color := $3A3A3A;
tchartright.colorchart := $3A3A3A;
tchartright.traces[0].color := configfo.tcoloredit2.Value;
// tchartright.traces[0].color := configfo.tcoloredit2.Value;
labelright.font.color := ltblank;

fond.color := $3A3A3A;
Expand All @@ -4051,17 +4083,19 @@ // spect1.face.template := recorderfo.tfacerecorder;
with spectrum2fo do
begin
tchartleft.colorchart := $3A3A3A;
tchartleft.traces[0].color := configfo.tcoloredit12.Value;
//tchartleft.traces[0].color := configfo.tcoloredit12.Value;
labelleft.font.color := ltblank;
// labelleft.color := $3A3A3A;
// labelright.color := $3A3A3A;
tchartright.colorchart := $3A3A3A;
tchartright.traces[0].color := configfo.tcoloredit22.Value;
//tchartright.traces[0].color := configfo.tcoloredit22.Value;
tchartleft.traces[0].bar_face.fade_color.items[1] := configfo.tcoloredit12.Value;
tchartright.traces[0].bar_face.fade_color.items[1] := configfo.tcoloredit22.Value;
tchartleft.traces[0].bar_face.fade_color.items[0] := $F7F7F7;
tchartright.traces[0].bar_face.fade_color.items[0] := $F7F7F7;
labelright.font.color := ltblank;
tchartleft.color := $3A3A3A;
tchartright.color := $3A3A3A;


fond.color := $3A3A3A;
groupbox1.frame.font.color := ltblank;
groupbox2.frame.font.color := ltblank;
Expand All @@ -4076,13 +4110,18 @@ // spect1.face.template := recorderfo.tfacerecorder;
with spectrumrecfo do
begin
tchartleft.colorchart := $3A3A3A;
tchartleft.traces[0].color := $7A7A7A;
//tchartleft.traces[0].color := $7A7A7A;
labelleft.font.color := ltblank;
// labelleft.color := $3A3A3A;
// labelright.color := $3A3A3A;
tchartright.colorchart := $3A3A3A;
tchartright.traces[0].color := $7A7A7A;
//tchartright.traces[0].color := $7A7A7A;
labelright.font.color := ltblank;

tchartleft.traces[0].bar_face.fade_color.items[1] := cl_white;
tchartright.traces[0].bar_face.fade_color.items[1] := cl_white;
tchartleft.traces[0].bar_face.fade_color.items[0] := $F7F7F7;
tchartright.traces[0].bar_face.fade_color.items[0] := $F7F7F7;

tchartleft.color := $3A3A3A;
tchartright.color := $3A3A3A;
Expand Down
Loading

0 comments on commit d36ca01

Please sign in to comment.