diff --git a/components/synedit/synedit.pp b/components/synedit/synedit.pp index 5757e1c157..d1c2bb83aa 100644 --- a/components/synedit/synedit.pp +++ b/components/synedit/synedit.pp @@ -11059,9 +11059,12 @@ begin RegisterPropertyToSkip(TSynSelectedColor, 'OnChange', '', ''); RegisterPropertyToSkip(TSynSelectedColor, 'StartX', '', ''); RegisterPropertyToSkip(TSynSelectedColor, 'EndX', '', ''); - RegisterPropertyToSkip(TLazEditTextAttributeModifier, 'OnChange', '', ''); RegisterPropertyToSkip(TLazEditTextAttributeModifier, 'StartX', '', ''); RegisterPropertyToSkip(TLazEditTextAttributeModifier, 'EndX', '', ''); + RegisterPropertyToSkip(TSynGutterColorAttributes, 'BackAlpha', '', ''); + RegisterPropertyToSkip(TSynGutterColorAttributes, 'ForeAlpha', '', ''); + RegisterPropertyToSkip(TSynGutterColorAttributes, 'FrameAlpha', '', ''); + RegisterPropertyToSkip(TSynGutterColorAttributes, 'StyleMask', '', ''); RegisterPropertyToSkip(TSynGutter, 'ShowCodeFolding', '', ''); RegisterPropertyToSkip(TSynGutter, 'CodeFoldingWidth', '', ''); diff --git a/components/synedit/syngutterbase.pp b/components/synedit/syngutterbase.pp index e43eb8b900..f14a5e6c08 100644 --- a/components/synedit/syngutterbase.pp +++ b/components/synedit/syngutterbase.pp @@ -16,6 +16,28 @@ uses type + TSynGutterColorAttributes = class(TLazEditTextAttribute) + published + property Foreground; + property Background; + property FrameColor; + + property ForePriority; + property BackPriority; + property FramePriority; + + property FrameStyle; + property FrameEdges; + + property Style; + property BoldPriority; + property ItalicPriority; + property UnderlinePriority; + property StrikeOutPriority; + + property OnChange; + end; + { TSynGutterColorAttributesModifier } TSynGutterColorAttributesModifier = class(TLazEditTextAttributeModifier) @@ -37,8 +59,6 @@ type property UnderlinePriority; property StrikeOutPriority; - //property Features; // not for gutter - property OnChange; published property BackAlpha; @@ -209,7 +229,7 @@ type FVisible: Boolean; FSynEdit: TSynEditBase; FGutter: TSynGutterBase; - FMarkupInfo: TSynGutterColorAttributesModifier; + FMarkupInfo: TSynGutterColorAttributes; FMarkupInfoInternal: TLazEditTextAttributeModifier; FMarkupInfoCurrentLine: TSynGutterColorAttributesModifier; FMarkupInfoCurLineMerged: TSynSelectedColorMergeResult; @@ -224,7 +244,7 @@ type function GetGutterParts: TSynGutterPartListBase; function GetMouseActions: TSynEditMouseActions; procedure SetLeftOffset(AValue: integer); - procedure SetMarkupInfo(const AValue: TSynGutterColorAttributesModifier); + procedure SetMarkupInfo(const AValue: TSynGutterColorAttributes); procedure SetMarkupInfoCurrentLine(AValue: TSynGutterColorAttributesModifier); procedure SetMouseActions(const AValue: TSynEditMouseActions); procedure SetRightOffset(AValue: integer); @@ -278,7 +298,7 @@ type read FOnGutterClick write FOnGutterClick; property OnChange: TNotifyEvent read FOnChange write FOnChange; property Cursor: TCursor read FCursor write FCursor default crDefault; - property MarkupInfo: TSynGutterColorAttributesModifier read FMarkupInfo write SetMarkupInfo; + property MarkupInfo: TSynGutterColorAttributes read FMarkupInfo write SetMarkupInfo; property MarkupInfoCurrentLine: TSynGutterColorAttributesModifier read FMarkupInfoCurrentLine write SetMarkupInfoCurrentLine; published property AutoSize: boolean read FAutoSize write SetAutoSize default True; @@ -730,7 +750,7 @@ begin Result := Gutter.CaretRow; end; -procedure TSynGutterPartBase.SetMarkupInfo(const AValue: TSynGutterColorAttributesModifier); +procedure TSynGutterPartBase.SetMarkupInfo(const AValue: TSynGutterColorAttributes); begin FMarkupInfo.Assign(AValue); end; @@ -876,7 +896,7 @@ begin if (AnOwner = nil) or not(AnOwner is TSynGutterPartListBase) then raise Exception.Create('Invalid Owner'); - FMarkupInfo := TSynGutterColorAttributesModifier.Create; + FMarkupInfo := TSynGutterColorAttributes.Create; FMarkupInfo.Background := clBtnFace; FMarkupInfo.Foreground := clNone; FMarkupInfo.FrameColor := clNone; diff --git a/components/synedit/synguttercodefolding.pp b/components/synedit/synguttercodefolding.pp index caf23ce8f8..177b70d2de 100644 --- a/components/synedit/synguttercodefolding.pp +++ b/components/synedit/synguttercodefolding.pp @@ -78,8 +78,8 @@ type aCount: Integer); procedure DoIncPaintLock(Sender: TObject); private - FMarkupInfoCurrentFold: TSynGutterColorAttributesModifier; - FMarkupInfoCurrentFoldInternal: TLazEditTextAttributeModifier; + FMarkupInfoCurrentFold: TSynGutterColorAttributes; + FMarkupInfoCurrentFoldInternal: TLazEditTextAttribute; FMouseActionsCollapsed: TSynEditMouseInternalActions; FMouseActionsExpanded: TSynEditMouseInternalActions; FPopUp: TPopupMenu; @@ -92,7 +92,7 @@ type function GetFoldView: TSynEditFoldedView; function GetMouseActionsCollapsed: TSynEditMouseActions; function GetMouseActionsExpanded: TSynEditMouseActions; - procedure SetMarkupInfoCurrentFold(AValue: TSynGutterColorAttributesModifier); + procedure SetMarkupInfoCurrentFold(AValue: TSynGutterColorAttributes); procedure SetMouseActionsCollapsed(const AValue: TSynEditMouseActions); procedure SetMouseActionsExpanded(const AValue: TSynEditMouseActions); function FoldTypeForLine(AScreenLine: Integer): TSynEditFoldLineCapability; @@ -133,7 +133,7 @@ type published property MarkupInfo; property MarkupInfoCurrentLine; - property MarkupInfoCurrentFold: TSynGutterColorAttributesModifier read FMarkupInfoCurrentFold write SetMarkupInfoCurrentFold; + property MarkupInfoCurrentFold: TSynGutterColorAttributes read FMarkupInfoCurrentFold write SetMarkupInfoCurrentFold; property MouseActionsExpanded: TSynEditMouseActions read GetMouseActionsExpanded write SetMouseActionsExpanded; property MouseActionsCollapsed: TSynEditMouseActions @@ -166,7 +166,7 @@ begin end; procedure TSynGutterCodeFolding.SetMarkupInfoCurrentFold( - AValue: TSynGutterColorAttributesModifier); + AValue: TSynGutterColorAttributes); begin FMarkupInfoCurrentFold.Assign(AValue); end; @@ -456,8 +456,8 @@ begin FReversePopMenuOrder := true; FMouseActionsExpanded := TSynEditMouseActionsGutterFoldExpanded.Create(self); FMouseActionsCollapsed := TSynEditMouseActionsGutterFoldCollapsed.Create(self); - FMarkupInfoCurrentFold := TSynGutterColorAttributesModifier.Create; - FMarkupInfoCurrentFoldInternal := TLazEditTextAttributeModifier.Create; + FMarkupInfoCurrentFold := TSynGutterColorAttributes.Create; + FMarkupInfoCurrentFoldInternal := TLazEditTextAttribute.Create; FInnerFoldCaretY := -1; FInnerFoldStart := -1; @@ -887,7 +887,7 @@ var rcCodeFold: TRect; tmp: TSynEditFoldLineCapability; LineHeight, TextHeight, LineOffset, HalfBoxSize, aRow: Integer; - CurMarkUp: TLazEditTextAttributeModifier; + CurMarkUp: TLazEditTextAttribute; procedure DrawNodeBox(rcCodeFold: TRect; NodeType: TSynEditFoldLineCapability); var diff --git a/ide/editoroptions.pp b/ide/editoroptions.pp index 985078123d..2a4a1f753a 100644 --- a/ide/editoroptions.pp +++ b/ide/editoroptions.pp @@ -7792,7 +7792,7 @@ begin end; procedure TColorSchemeLanguage.ApplyTo(ASynEdit: TSynEdit); - procedure SetMarkupColor(aha: TAdditionalHilightAttribute; aMarkup : TLazEditTextAttributeModifier); + procedure SetMarkupColor(aha: TAdditionalHilightAttribute; aMarkup : TLazEditTextAttribute); var Attrib: TColorSchemeAttribute; begin Attrib := AttributeByEnum[aha];