mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 02:19:32 +02:00
PackageIntegration frame: Use TextHint. Issue #28197, patch from Alexey Torgashin.
git-svn-id: trunk@49201 -
This commit is contained in:
parent
7abf4ba56f
commit
b49ef96e4c
@ -10,8 +10,8 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
|||||||
DesignTop = 267
|
DesignTop = 267
|
||||||
object UpdateRadioGroup: TRadioGroup
|
object UpdateRadioGroup: TRadioGroup
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 103
|
Height = 89
|
||||||
Top = 133
|
Top = 114
|
||||||
Width = 461
|
Width = 461
|
||||||
Align = alTop
|
Align = alTop
|
||||||
AutoFill = True
|
AutoFill = True
|
||||||
@ -26,7 +26,7 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
|||||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
ChildSizing.ControlsPerLine = 1
|
ChildSizing.ControlsPerLine = 1
|
||||||
ClientHeight = 84
|
ClientHeight = 69
|
||||||
ClientWidth = 457
|
ClientWidth = 457
|
||||||
ItemIndex = 0
|
ItemIndex = 0
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
@ -38,14 +38,14 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
|||||||
end
|
end
|
||||||
object DocGroupBox: TGroupBox
|
object DocGroupBox: TGroupBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 91
|
Height = 84
|
||||||
Top = 242
|
Top = 209
|
||||||
Width = 461
|
Width = 461
|
||||||
Align = alTop
|
Align = alTop
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'FPDoc settings'
|
Caption = 'FPDoc settings'
|
||||||
ClientHeight = 72
|
ClientHeight = 64
|
||||||
ClientWidth = 457
|
ClientWidth = 457
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object FPDocSearchPathsEdit: TEdit
|
object FPDocSearchPathsEdit: TEdit
|
||||||
@ -54,10 +54,10 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
|||||||
AnchorSideTop.Control = DocGroupBox
|
AnchorSideTop.Control = DocGroupBox
|
||||||
AnchorSideRight.Control = DocGroupBox
|
AnchorSideRight.Control = DocGroupBox
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 175
|
Left = 138
|
||||||
Height = 27
|
Height = 23
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 276
|
Width = 313
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
@ -70,9 +70,9 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
|||||||
AnchorSideTop.Control = FPDocSearchPathsEdit
|
AnchorSideTop.Control = FPDocSearchPathsEdit
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 17
|
Height = 15
|
||||||
Top = 11
|
Top = 10
|
||||||
Width = 163
|
Width = 126
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'FPDocSearchPathsLabel'
|
Caption = 'FPDocSearchPathsLabel'
|
||||||
@ -83,9 +83,9 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
|||||||
AnchorSideTop.Control = FPDocPackageNameEdit
|
AnchorSideTop.Control = FPDocPackageNameEdit
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 17
|
Height = 15
|
||||||
Top = 44
|
Top = 39
|
||||||
Width = 176
|
Width = 138
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
Caption = 'FPDocPackageNameLabel'
|
Caption = 'FPDocPackageNameLabel'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -95,22 +95,19 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = FPDocSearchPathsEdit
|
AnchorSideTop.Control = FPDocSearchPathsEdit
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 188
|
Left = 150
|
||||||
Height = 27
|
Height = 23
|
||||||
Top = 39
|
Top = 35
|
||||||
Width = 116
|
Width = 116
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
OnEnter = FPDocPackageNameEditEnter
|
|
||||||
OnExit = FPDocPackageNameEditExit
|
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
Text = 'FPDocPackageNameEdit'
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object PkgTypeGroupBox: TGroupBox
|
object PkgTypeGroupBox: TGroupBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 127
|
Height = 108
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 461
|
Width = 461
|
||||||
Align = alTop
|
Align = alTop
|
||||||
@ -124,14 +121,14 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
|||||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
ChildSizing.ControlsPerLine = 1
|
ChildSizing.ControlsPerLine = 1
|
||||||
ClientHeight = 108
|
ClientHeight = 88
|
||||||
ClientWidth = 457
|
ClientWidth = 457
|
||||||
Constraints.MinHeight = 30
|
Constraints.MinHeight = 30
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
OnClick = PkgTypeGroupBoxClick
|
OnClick = PkgTypeGroupBoxClick
|
||||||
object RunAndDesignTimeRadioButton: TRadioButton
|
object RunAndDesignTimeRadioButton: TRadioButton
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 24
|
Height = 19
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 445
|
Width = 445
|
||||||
Caption = 'RunAndDesignTimeRadioButton'
|
Caption = 'RunAndDesignTimeRadioButton'
|
||||||
@ -143,8 +140,8 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
|||||||
end
|
end
|
||||||
object DesignTimeRadioButton: TRadioButton
|
object DesignTimeRadioButton: TRadioButton
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 24
|
Height = 19
|
||||||
Top = 30
|
Top = 25
|
||||||
Width = 445
|
Width = 445
|
||||||
Caption = 'DesignTimeRadioButton'
|
Caption = 'DesignTimeRadioButton'
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
@ -153,8 +150,8 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
|||||||
end
|
end
|
||||||
object RunTimeRadioButton: TRadioButton
|
object RunTimeRadioButton: TRadioButton
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 24
|
Height = 19
|
||||||
Top = 54
|
Top = 44
|
||||||
Width = 445
|
Width = 445
|
||||||
Caption = 'RunTimeRadioButton'
|
Caption = 'RunTimeRadioButton'
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
@ -163,8 +160,8 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
|||||||
end
|
end
|
||||||
object RunTimeOnlyRadioButton: TRadioButton
|
object RunTimeOnlyRadioButton: TRadioButton
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 24
|
Height = 19
|
||||||
Top = 78
|
Top = 63
|
||||||
Width = 445
|
Width = 445
|
||||||
Caption = 'RunTimeOnlyRadioButton'
|
Caption = 'RunTimeOnlyRadioButton'
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
|
@ -25,8 +25,6 @@ type
|
|||||||
RunTimeOnlyRadioButton: TRadioButton;
|
RunTimeOnlyRadioButton: TRadioButton;
|
||||||
RunTimeRadioButton: TRadioButton;
|
RunTimeRadioButton: TRadioButton;
|
||||||
UpdateRadioGroup: TRadioGroup;
|
UpdateRadioGroup: TRadioGroup;
|
||||||
procedure FPDocPackageNameEditEnter(Sender: TObject);
|
|
||||||
procedure FPDocPackageNameEditExit(Sender: TObject);
|
|
||||||
procedure PkgTypeGroupBoxClick(Sender: TObject);
|
procedure PkgTypeGroupBoxClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
FLazPackage: TLazPackage;
|
FLazPackage: TLazPackage;
|
||||||
@ -68,20 +66,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPackageIntegrationOptionsFrame.FPDocPackageNameEditEnter(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if FPDocPackageNameEdit.Text=lisDefaultPlaceholder then
|
|
||||||
FPDocPackageNameEdit.Text:='';
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPackageIntegrationOptionsFrame.FPDocPackageNameEditExit(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if GetFPDocPkgNameEditValue='' then
|
|
||||||
FPDocPackageNameEdit.Text:=lisDefaultPlaceholder
|
|
||||||
else
|
|
||||||
FPDocPackageNameEdit.Text:=GetFPDocPkgNameEditValue;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TPackageIntegrationOptionsFrame.GetSelectedPkgType: TLazPackageType;
|
function TPackageIntegrationOptionsFrame.GetSelectedPkgType: TLazPackageType;
|
||||||
begin
|
begin
|
||||||
if RunTimeOnlyRadioButton.Checked then
|
if RunTimeOnlyRadioButton.Checked then
|
||||||
@ -204,10 +188,9 @@ begin
|
|||||||
UpdateRadioGroup.ItemIndex := 2;
|
UpdateRadioGroup.ItemIndex := 2;
|
||||||
end;
|
end;
|
||||||
SetPathTextAndHint(FLazPackage.FPDocPaths, FPDocSearchPathsEdit);
|
SetPathTextAndHint(FLazPackage.FPDocPaths, FPDocSearchPathsEdit);
|
||||||
if FLazPackage.FPDocPackageName='' then
|
|
||||||
FPDocPackageNameEdit.Text:=lisDefaultPlaceholder
|
FPDocPackageNameEdit.TextHint:=lisDefaultPlaceholder;
|
||||||
else
|
FPDocPackageNameEdit.Text:=FLazPackage.FPDocPackageName;
|
||||||
FPDocPackageNameEdit.Text:=FLazPackage.FPDocPackageName;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPackageIntegrationOptionsFrame.ShowMsgPackageTypeMustBeDesign: boolean;
|
function TPackageIntegrationOptionsFrame.ShowMsgPackageTypeMustBeDesign: boolean;
|
||||||
@ -226,10 +209,7 @@ end;
|
|||||||
|
|
||||||
function TPackageIntegrationOptionsFrame.GetFPDocPkgNameEditValue: string;
|
function TPackageIntegrationOptionsFrame.GetFPDocPkgNameEditValue: string;
|
||||||
begin
|
begin
|
||||||
if FPDocPackageNameEdit.Text=lisDefaultPlaceholder then
|
Result:=MakeValidFPDocPackageName(FPDocPackageNameEdit.Text);
|
||||||
Result:=''
|
|
||||||
else
|
|
||||||
Result:=MakeValidFPDocPackageName(FPDocPackageNameEdit.Text);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPackageIntegrationOptionsFrame.Check: Boolean;
|
function TPackageIntegrationOptionsFrame.Check: Boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user