Attached patch moves all components into a panel, that better fits
together with elastic sites (e.g. Messages at bottom).
Unfortunately the resize behaviour is not pleasant, it should resize the
elastic panel according to the space left by the main panel. How can
this be achieved?
Note: elastic docksites are added alLeft/Right/Bottom, and autosize will
not shrink them. (How to?)
When the main panel is aligned alClient, it is restricted to the space
left over by the alBottom panel.
When the main panel is aligned alTop, it can conflict with an elastic
site at alBottom (it can overlap the splitter and top part of the
elastic site).
How can this conflict be solved?
DoDi
diff --git a/ide/main.pp b/ide/main.pp
index e8282b0..f74054e 100644
--- a/ide/main.pp
+++ b/ide/main.pp
@@ -1319,7 +1319,7 @@ begin
Application.CreateForm(TMainIDEBar,MainIDEBar);
MainIDEBar.OnDestroy:=...@onmainbardestroy;
- //MainIDEBar.Constraints.MaxHeight:=110;
+ MainIDEBar.Constraints.MaxHeight:=110;
MainIDEBar.Name := NonModalIDEWindowNames[nmiwMainIDEName];
FormCreator:=IDEWindowCreators.Add(MainIDEBar.Name);
FormCreator.Right:='100%';
@@ -1779,25 +1779,11 @@ procedure TMainIDE.SetupSpeedButtons;
end;
begin
-(* Put everything into a panel.
- Problem: panel should stay on top, but this conflicts with elastic panel at
bottom
- (autosize should move the elastic panel)
- alClient fits together with elastic panel, but doesn't provide the expected
result
-*)
- MainIDEBar.pnlMain := TPanel.Create(OwningComponent);
- with MainIDEBar.pnlMain do begin
- Parent := MainIDEBar;
- Caption := '';
- Align := alClient; // alTop;
- AutoSize := True;
- Visible := True;
- end;
-
MainIDEBar.pnlSpeedButtons := TPanel.Create(OwningComponent);
with MainIDEBar.pnlSpeedButtons do
begin
Name := 'pnlSpeedButtons';
- Parent := MainIDEBar.pnlMain;
+ Parent := MainIDEBar;
Align := alLeft;
Caption := '';
BevelOuter := bvNone;
@@ -1858,7 +1844,7 @@ begin
Name := 'ComponentPageControl';
Align := alClient;
Visible:=EnvironmentOptions.ComponentPaletteVisible;
- Parent := MainIDEBar.pnlMain;
+ Parent := MainIDEBar;
end;
end;
diff --git a/ide/mainbar.pas b/ide/mainbar.pas
index 1e6b50c..cc1e872 100644
--- a/ide/mainbar.pas
+++ b/ide/mainbar.pas
@@ -49,8 +49,7 @@ type
{ TMainIDEBar }
TMainIDEBar = class(TForm)
-
- pnlMain: TPanel;
+
// the speedbuttons panel for frequently used IDE functions
pnlSpeedButtons : TPanel;
tbStandard : TToolBar;
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus