mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 16:31:40 +02:00
ide: don't reserve space for build mode combo if it is not visible
git-svn-id: trunk@41716 -
This commit is contained in:
parent
e3f594943a
commit
81bcce809a
@ -45,6 +45,8 @@ object IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
Width = 4
|
Width = 4
|
||||||
end
|
end
|
||||||
object CategoryPanel: TPanel
|
object CategoryPanel: TPanel
|
||||||
|
AnchorSideLeft.Control = Owner
|
||||||
|
AnchorSideTop.Control = Owner
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 364
|
Height = 364
|
||||||
Top = 0
|
Top = 0
|
||||||
@ -63,11 +65,11 @@ object IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = SettingsPanel
|
AnchorSideBottom.Control = SettingsPanel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 308
|
Height = 309
|
||||||
Top = 36
|
Top = 35
|
||||||
Width = 249
|
Width = 249
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Top = 5
|
BorderSpacing.Top = 6
|
||||||
DefaultItemHeight = 18
|
DefaultItemHeight = 18
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@ -79,10 +81,11 @@ object IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
end
|
end
|
||||||
object FilterEdit: TTreeFilterEdit
|
object FilterEdit: TTreeFilterEdit
|
||||||
AnchorSideLeft.Control = CategoryPanel
|
AnchorSideLeft.Control = CategoryPanel
|
||||||
|
AnchorSideTop.Control = CategoryPanel
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 8
|
Top = 6
|
||||||
Width = 200
|
Width = 200
|
||||||
OnFilterItem = FilterEditFilterItem
|
OnFilterItem = FilterEditFilterItem
|
||||||
UseFormActivate = True
|
UseFormActivate = True
|
||||||
@ -90,6 +93,7 @@ object IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
NumGlyphs = 1
|
NumGlyphs = 1
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
|
BorderSpacing.Top = 6
|
||||||
Font.Color = clBtnShadow
|
Font.Color = clBtnShadow
|
||||||
MaxLength = 0
|
MaxLength = 0
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
@ -111,16 +115,17 @@ object IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
object BuildModeSelectPanel: TPanel
|
object BuildModeSelectPanel: TPanel
|
||||||
AnchorSideLeft.Control = CatTVSplitter
|
AnchorSideLeft.Control = CatTVSplitter
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = Owner
|
||||||
AnchorSideRight.Control = EditorsPanel
|
AnchorSideRight.Control = EditorsPanel
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 259
|
Left = 259
|
||||||
Height = 40
|
Height = 40
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 427
|
Width = 424
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 40
|
ClientHeight = 40
|
||||||
ClientWidth = 427
|
ClientWidth = 424
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object BuildModeLabel: TLabel
|
object BuildModeLabel: TLabel
|
||||||
Left = 12
|
Left = 12
|
||||||
@ -181,16 +186,19 @@ object IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = BuildModeSelectPanel
|
AnchorSideTop.Control = BuildModeSelectPanel
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = Owner
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = ButtonPanel
|
AnchorSideBottom.Control = ButtonPanel
|
||||||
Left = 259
|
Left = 259
|
||||||
Height = 324
|
Height = 324
|
||||||
Top = 40
|
Top = 40
|
||||||
Width = 427
|
Width = 424
|
||||||
HorzScrollBar.Page = 427
|
HorzScrollBar.Page = 424
|
||||||
HorzScrollBar.Tracking = True
|
HorzScrollBar.Tracking = True
|
||||||
VertScrollBar.Page = 324
|
VertScrollBar.Page = 324
|
||||||
VertScrollBar.Tracking = True
|
VertScrollBar.Tracking = True
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
BorderSpacing.Right = 6
|
||||||
BorderStyle = bsNone
|
BorderStyle = bsNone
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
|
@ -97,6 +97,7 @@ type
|
|||||||
procedure SetSettings(const AValue: TIDEOptionsEditorSettings);
|
procedure SetSettings(const AValue: TIDEOptionsEditorSettings);
|
||||||
function AllBuildModes: boolean;
|
function AllBuildModes: boolean;
|
||||||
procedure UpdateBuildModeButtons;
|
procedure UpdateBuildModeButtons;
|
||||||
|
procedure SetBuldModeVisibility(AVisibility: Boolean);
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
function ShowModal: Integer; override;
|
function ShowModal: Integer; override;
|
||||||
@ -132,7 +133,7 @@ begin
|
|||||||
FEditorsCreated := False;
|
FEditorsCreated := False;
|
||||||
FEditorToOpen := nil;
|
FEditorToOpen := nil;
|
||||||
SettingsPanel.Constraints.MinHeight:=0;
|
SettingsPanel.Constraints.MinHeight:=0;
|
||||||
BuildModeSelectPanel.Visible:=false;
|
SetBuldModeVisibility(False);
|
||||||
BuildModeLabel.Caption:=lisBuildMode;
|
BuildModeLabel.Caption:=lisBuildMode;
|
||||||
BuildModeInSessionCheckBox.Caption:=lisInSession;
|
BuildModeInSessionCheckBox.Caption:=lisInSession;
|
||||||
BuildModeInSessionCheckBox.Hint:=
|
BuildModeInSessionCheckBox.Hint:=
|
||||||
@ -199,10 +200,7 @@ begin
|
|||||||
GroupClass := FindGroupClass(Node);
|
GroupClass := FindGroupClass(Node);
|
||||||
end;
|
end;
|
||||||
// Show the Build Mode panel for project compiler options
|
// Show the Build Mode panel for project compiler options
|
||||||
if (GroupClass <> nil) and (GroupClass.InheritsFrom(TProjectCompilerOptions)) then
|
SetBuldModeVisibility((GroupClass <> nil) and (GroupClass.InheritsFrom(TProjectCompilerOptions)));
|
||||||
BuildModeSelectPanel.Visible:=true
|
|
||||||
else
|
|
||||||
BuildModeSelectPanel.Visible:=false;
|
|
||||||
// Hide the old and show the new editor frame
|
// Hide the old and show the new editor frame
|
||||||
if Assigned(AEditor) then
|
if Assigned(AEditor) then
|
||||||
FNewLastSelected := AEditor.Rec;
|
FNewLastSelected := AEditor.Rec;
|
||||||
@ -621,6 +619,21 @@ begin
|
|||||||
BuildModeInSessionCheckBox.Checked:=Project1.ActiveBuildMode.InSession;
|
BuildModeInSessionCheckBox.Checked:=Project1.ActiveBuildMode.InSession;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TIDEOptionsDialog.SetBuldModeVisibility(AVisibility: Boolean);
|
||||||
|
begin
|
||||||
|
BuildModeSelectPanel.Visible := AVisibility;
|
||||||
|
if AVisibility then
|
||||||
|
begin
|
||||||
|
EditorsPanel.AnchorSide[akTop].Control := BuildModeSelectPanel;
|
||||||
|
EditorsPanel.AnchorSide[akTop].Side := asrBottom;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
EditorsPanel.AnchorSide[akTop].Control := Self;
|
||||||
|
EditorsPanel.AnchorSide[akTop].Side := asrTop;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TIDEOptionsDialog.DoOpenEditor(EditorToOpen: TAbstractIDEOptionsEditorClass);
|
procedure TIDEOptionsDialog.DoOpenEditor(EditorToOpen: TAbstractIDEOptionsEditorClass);
|
||||||
var
|
var
|
||||||
Node: TTreeNode;
|
Node: TTreeNode;
|
||||||
|
Loading…
Reference in New Issue
Block a user