mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-23 10:59:14 +02:00
Merge branch 'IDE/PjInsp/PropsPanelHeight' into 'main'
IDE/ProjectInspector: Remember property panel height in desktop options. Issue #39955 See merge request freepascal.org/lazarus/lazarus!372
This commit is contained in:
commit
699e1650a1
@ -133,6 +133,7 @@ type
|
||||
TDesktopOpt = class(TCustomDesktopOpt)
|
||||
private const
|
||||
DEFAULT_CUSTOM_TITLE = '$project(TitleNew) $EncloseBracket($project(infodir)) $(BuildModeCaption)';
|
||||
cDefaultPropsPanelHeight = 140;
|
||||
private
|
||||
// window layout
|
||||
FIDEWindowCreatorsLayoutList: TSimpleWindowLayoutList;
|
||||
@ -143,6 +144,7 @@ type
|
||||
FAutoAdjustIDEHeight: boolean;
|
||||
FAutoAdjustIDEHeightFullCompPal: boolean;
|
||||
FProjectInspectorShowProps: boolean;
|
||||
FProjectInspectorPropsPanelHeight: integer;
|
||||
// window menu
|
||||
FIDENameForDesignedFormList: boolean;
|
||||
// CompletionWindow
|
||||
@ -200,6 +202,8 @@ type
|
||||
property ObjectInspectorOptions: TDesktopOIOptions read FObjectInspectorOptions;
|
||||
property ProjectInspectorShowProps: boolean read FProjectInspectorShowProps
|
||||
write FProjectInspectorShowProps;
|
||||
property ProjectInspectorPropsPanelHeight: integer read FProjectInspectorPropsPanelHeight
|
||||
write FProjectInspectorPropsPanelHeight;
|
||||
end;
|
||||
|
||||
{ TUnsupportedDesktopOpt }
|
||||
@ -585,6 +589,7 @@ begin
|
||||
FObjectInspectorOptions:=TDesktopOIOptions.Create;
|
||||
// project inspector
|
||||
FProjectInspectorShowProps := true;
|
||||
FProjectInspectorPropsPanelHeight := cDefaultPropsPanelHeight;
|
||||
// Windows layout
|
||||
InitLayoutList;
|
||||
|
||||
@ -653,6 +658,7 @@ begin
|
||||
FObjectInspectorOptions.Assign(Source.FObjectInspectorOptions);
|
||||
// project inspector
|
||||
FProjectInspectorShowProps := Source.FProjectInspectorShowProps;
|
||||
FProjectInspectorPropsPanelHeight := Source.FProjectInspectorPropsPanelHeight;
|
||||
|
||||
if IsCompatible and Assigned(FDockedOpt) then
|
||||
FDockedOpt.Assign(Source.FDockedOpt);
|
||||
@ -690,6 +696,7 @@ begin
|
||||
FCompletionWindowHeight:=FXMLCfg.GetValue(Path+'CompletionWindowOptions/Height/Value', 6);
|
||||
// Project Inspector
|
||||
FProjectInspectorShowProps := FXMLCfg.GetValue(Path+'ProjectInspectorShowProps/Value', true);
|
||||
FProjectInspectorPropsPanelHeight := FXMLCfg.GetValue(Path+'ProjectInspectorPropsPanelHeight/Value', cDefaultPropsPanelHeight);
|
||||
|
||||
if not FXMLCfg.HasPath(Path+'IDECoolBarOptions/', True) then
|
||||
Path := ''; // Toolbars and palette were at the top level in XML.
|
||||
@ -743,6 +750,7 @@ begin
|
||||
FXMLCfg.SetDeleteValue(Path+'CompletionWindowOptions/Height/Value',FCompletionWindowHeight, 6);
|
||||
// Project Inspector
|
||||
FXMLCfg.SetDeleteValue(Path+'ProjectInspectorShowProps/Value', FProjectInspectorShowProps, true);
|
||||
FXMLCfg.SetDeleteValue(Path+'ProjectInspectorPropsPanelHeight/Value', FProjectInspectorPropsPanelHeight, cDefaultPropsPanelHeight);
|
||||
// IDE Coolbar
|
||||
FIDECoolBarOptions.Save(FXMLCfg, Path);
|
||||
// Editor Toolbar
|
||||
|
@ -138,12 +138,13 @@ object ProjectInspectorForm: TProjectInspectorForm
|
||||
end
|
||||
object PropsGroupBox: TGroupBox
|
||||
Left = 0
|
||||
Height = 141
|
||||
Height = 140
|
||||
Top = 344
|
||||
Width = 463
|
||||
Align = alBottom
|
||||
Caption = 'PropsGroupBox'
|
||||
TabOrder = 3
|
||||
OnResize = PropsGroupBoxResize
|
||||
end
|
||||
object Splitter1: TSplitter
|
||||
Cursor = crVSplit
|
||||
|
@ -164,6 +164,7 @@ type
|
||||
procedure mnuOpenFolderClick(Sender: TObject);
|
||||
procedure MoveDependencyUpClick(Sender: TObject);
|
||||
procedure MoveDependencyDownClick(Sender: TObject);
|
||||
procedure PropsGroupBoxResize(Sender: TObject);
|
||||
procedure SetDependencyDefaultFilenameMenuItemClick(Sender: TObject);
|
||||
procedure SetDependencyPreferredFilenameMenuItemClick(Sender: TObject);
|
||||
procedure ClearDependencyFilenameMenuItemClick(Sender: TObject);
|
||||
@ -670,6 +671,12 @@ begin
|
||||
LazProject.MoveRequiredDependencyDown(Dependency);
|
||||
end;
|
||||
|
||||
procedure TProjectInspectorForm.PropsGroupBoxResize(Sender: TObject);
|
||||
begin
|
||||
if PropsGroupBox.Visible then
|
||||
EnvironmentGuiOpts.Desktop.ProjectInspectorPropsPanelHeight := PropsGroupBox.Height;
|
||||
end;
|
||||
|
||||
procedure TProjectInspectorForm.SetDependencyDefaultFilenameMenuItemClick(Sender: TObject);
|
||||
begin
|
||||
SetDependencyDefaultFilename(false);
|
||||
@ -1385,6 +1392,7 @@ end;
|
||||
procedure TProjectInspectorForm.OptionsChanged(Sender: TObject; Restore: boolean);
|
||||
begin
|
||||
PropsGroupBox.Visible := EnvironmentGuiOpts.Desktop.ProjectInspectorShowProps;
|
||||
PropsGroupBox.Height := EnvironmentGuiOpts.Desktop.ProjectInspectorPropsPanelHeight;
|
||||
Splitter1.Visible := PropsGroupBox.Visible;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user