mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 20:47:58 +02:00
SynEdit, EditorOpts: fix color for outline
git-svn-id: trunk@58744 -
This commit is contained in:
parent
cafa0499b0
commit
c825d4842d
@ -146,7 +146,7 @@ type
|
||||
constructor Create;
|
||||
constructor Create(aCaption: string; aStoredName: String = '');
|
||||
constructor Create(aCaption: PString; aStoredName: String = '');
|
||||
function IsEnabled: boolean;
|
||||
function IsEnabled: boolean; virtual;
|
||||
procedure InternalSaveDefaultValues; virtual;
|
||||
function LoadFromBorlandRegistry(rootKey: HKEY; attrKey, attrName: string;
|
||||
oldStyle: boolean): boolean; virtual;
|
||||
|
@ -282,6 +282,7 @@ type
|
||||
procedure Init; override;
|
||||
public
|
||||
constructor Create(ASchemeLang: TColorSchemeLanguage; attribName: PString; aStoredName: String = '');
|
||||
function IsEnabled: boolean; override;
|
||||
procedure ApplyTo(aDest: TSynHighlighterAttributes; aDefault: TColorSchemeAttribute = nil);
|
||||
procedure Assign(Src: TPersistent); override;
|
||||
function Equals(Other: TColorSchemeAttribute): Boolean; reintroduce;
|
||||
@ -6044,6 +6045,11 @@ begin
|
||||
FUseSchemeGlobals := True;
|
||||
end;
|
||||
|
||||
function TColorSchemeAttribute.IsEnabled: boolean;
|
||||
begin
|
||||
Result := (inherited IsEnabled) or (FMarkupFoldLineColor <> clNone);
|
||||
end;
|
||||
|
||||
procedure TColorSchemeAttribute.ApplyTo(aDest: TSynHighlighterAttributes;
|
||||
aDefault: TColorSchemeAttribute);
|
||||
// aDefault (if supplied) is usuallythe Schemes agnDefault / DefaultAttribute
|
||||
@ -6763,7 +6769,8 @@ begin
|
||||
TSynEditMarkupFoldColors(aSynEdit.Markup[i]).LineColor[j].Alpha := Attri.MarkupFoldLineAlpha;
|
||||
TSynEditMarkupFoldColors(aSynEdit.Markup[i]).LineColor[j].Priority := Attri.FramePriority;
|
||||
inc(j);
|
||||
c := j;
|
||||
if Attri.IsEnabled then
|
||||
c := j;
|
||||
end;
|
||||
end;
|
||||
TSynEditMarkupFoldColors(aSynEdit.Markup[i]).ColorCount := c; // discard unused colors at the end
|
||||
|
Loading…
Reference in New Issue
Block a user