mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 12:19:28 +02:00
IDE: Add a link in editor options for Codetools "Max Length" setting. Fix anchors. Issue #36213, patch by n7800.
This commit is contained in:
parent
1a84469a59
commit
8060c44b3c
@ -61,8 +61,8 @@ object EditorDisplayOptionsFrame: TEditorDisplayOptionsFrame
|
||||
Font.Color = clBlue
|
||||
ParentFont = False
|
||||
OnClick = RightMarginColorLinkClick
|
||||
OnMouseEnter = RightMarginColorLinkMouseEnter
|
||||
OnMouseLeave = RightMarginColorLinkMouseLeave
|
||||
OnMouseEnter = LinkLabelMouseEnter
|
||||
OnMouseLeave = LinkLabelMouseLeave
|
||||
end
|
||||
object VisibleRightMarginCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = MarginAndGutterGroupBox
|
||||
@ -78,12 +78,14 @@ object EditorDisplayOptionsFrame: TEditorDisplayOptionsFrame
|
||||
end
|
||||
object VisibleGutterCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = MarginAndGutterGroupBox
|
||||
AnchorSideTop.Control = chkTopInfoView
|
||||
AnchorSideTop.Control = VisibleRightMarginCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 31
|
||||
Width = 138
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
Caption = 'VisibleGutterCheckBox'
|
||||
TabOrder = 1
|
||||
@ -127,13 +129,12 @@ object EditorDisplayOptionsFrame: TEditorDisplayOptionsFrame
|
||||
end
|
||||
object chkTopInfoView: TCheckBox
|
||||
AnchorSideLeft.Control = RightMarginComboBox
|
||||
AnchorSideTop.Control = VisibleRightMarginCheckBox
|
||||
AnchorSideTop.Control = RightMarginComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 271
|
||||
Height = 19
|
||||
Top = 31
|
||||
Width = 103
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'chkTopInfoView'
|
||||
TabOrder = 4
|
||||
end
|
||||
@ -292,6 +293,24 @@ object EditorDisplayOptionsFrame: TEditorDisplayOptionsFrame
|
||||
Text = 'cbCurLineMarkup'
|
||||
OnChange = spinGutterPartWidthChange
|
||||
end
|
||||
object RightMarginMaxLengthLink: TLabel
|
||||
AnchorSideLeft.Control = RightMarginColorLink
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = RightMarginLabel
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Cursor = crHandPoint
|
||||
Left = 535
|
||||
Height = 13
|
||||
Top = 10
|
||||
Width = 128
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'RightMarginMaxLengthLink'
|
||||
Font.Color = clBlue
|
||||
ParentFont = False
|
||||
OnClick = RightMarginMaxLengthLinkClick
|
||||
OnMouseEnter = LinkLabelMouseEnter
|
||||
OnMouseLeave = LinkLabelMouseLeave
|
||||
end
|
||||
end
|
||||
object EditorFontGroupBox: TGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
|
@ -35,8 +35,9 @@ uses
|
||||
// IdeIntf
|
||||
IDEOptionsIntf, IDEOptEditorIntf, IDEUtils, IDEImagesIntf,
|
||||
// IDE
|
||||
EditorOptions, LazarusIDEStrConsts, editor_general_options, editor_color_options,
|
||||
SourceSynEditor, SourceMarks;
|
||||
EditorOptions, LazarusIDEStrConsts, editor_general_options,
|
||||
editor_color_options, codetools_linesplitting_options, SourceSynEditor,
|
||||
SourceMarks;
|
||||
|
||||
type
|
||||
{ TEditorDisplayOptionsFrame }
|
||||
@ -62,6 +63,7 @@ type
|
||||
MarginAndGutterGroupBox: TGroupBox;
|
||||
rgGutterSite: TRadioGroup;
|
||||
RightMarginColorLink: TLabel;
|
||||
RightMarginMaxLengthLink: TLabel;
|
||||
RightMarginComboBox: TComboBox;
|
||||
RightMarginLabel: TLabel;
|
||||
ShowOnlyLineNumbersMultiplesOfLabel: TLabel;
|
||||
@ -87,8 +89,9 @@ type
|
||||
procedure rgGutterSiteClick(Sender: TObject);
|
||||
procedure FillGutterPartList;
|
||||
procedure RightMarginColorLinkClick(Sender: TObject);
|
||||
procedure RightMarginColorLinkMouseEnter(Sender: TObject);
|
||||
procedure RightMarginColorLinkMouseLeave(Sender: TObject);
|
||||
procedure RightMarginMaxLengthLinkClick(Sender: TObject);
|
||||
procedure LinkLabelMouseEnter(Sender: TObject);
|
||||
procedure LinkLabelMouseLeave(Sender: TObject);
|
||||
procedure spinGutterPartWidthChange(Sender: TObject);
|
||||
private
|
||||
FDialog: TAbstractOptionsEditorDialog;
|
||||
@ -469,13 +472,23 @@ begin
|
||||
col.SelectAhaColor(ahaRightMargin);
|
||||
end;
|
||||
|
||||
procedure TEditorDisplayOptionsFrame.RightMarginColorLinkMouseEnter(Sender: TObject);
|
||||
procedure TEditorDisplayOptionsFrame.RightMarginMaxLengthLinkClick(
|
||||
Sender: TObject);
|
||||
var
|
||||
col: TCodetoolsLineSplittingOptionsFrame;
|
||||
begin
|
||||
col := TCodetoolsLineSplittingOptionsFrame(FDialog.FindEditor(TCodetoolsLineSplittingOptionsFrame));
|
||||
if col = nil then exit;
|
||||
FDialog.OpenEditor(TCodetoolsLineSplittingOptionsFrame);
|
||||
end;
|
||||
|
||||
procedure TEditorDisplayOptionsFrame.LinkLabelMouseEnter(Sender: TObject);
|
||||
begin
|
||||
(Sender as TLabel).Font.Underline := True;
|
||||
(Sender as TLabel).Font.Color := clRed;
|
||||
end;
|
||||
|
||||
procedure TEditorDisplayOptionsFrame.RightMarginColorLinkMouseLeave(Sender: TObject);
|
||||
procedure TEditorDisplayOptionsFrame.LinkLabelMouseLeave(Sender: TObject);
|
||||
begin
|
||||
(Sender as TLabel).Font.Underline := False;
|
||||
(Sender as TLabel).Font.Color := clBlue;
|
||||
@ -541,6 +554,7 @@ begin
|
||||
ExtraLineSpacingLabel.Caption := dlgExtraLineSpacing;
|
||||
DisableAntialiasingCheckBox.Caption := dlgDisableAntialiasing;
|
||||
RightMarginColorLink.Caption := dlgColorLink;
|
||||
RightMarginMaxLengthLink.Caption := dlgEditMaxLength;
|
||||
chkTopInfoView.Caption := lisTopInfoView;
|
||||
|
||||
btnGutterUp.Images := IDEImages.Images_16;
|
||||
|
@ -1807,6 +1807,7 @@ resourcestring
|
||||
dlgMultiCaretMode = 'Navigation keys move all carets';
|
||||
dlgMultiCaretDelSkipCr = 'Skip delete key at EOL (do not join lines)';
|
||||
dlgColorLink = '(Edit Color)';
|
||||
dlgEditMaxLength = '(Edit Max Length)';
|
||||
dlgKeyLink = '(Edit Key)';
|
||||
dlgBracketHighlight = 'Bracket highlight';
|
||||
dlgNoBracketHighlight = 'No Highlight';
|
||||
|
Loading…
Reference in New Issue
Block a user