编辑器
颜色自定义优化
This commit is contained in:
@@ -779,7 +779,13 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
||||
function PaintGutter(rcDraw,nL1,nL2);
|
||||
begin
|
||||
dc := Canvas;
|
||||
dc.brush.Color :=FGutterColor ;//rgb(228,228,228);
|
||||
if ifnumber(FGutterColor) then
|
||||
begin
|
||||
c := FGutterColor;
|
||||
end else
|
||||
if ifobj(FGutterColor) then c := FGutterColor.color;
|
||||
else c := rgb(228,228,228);
|
||||
dc.brush.Color :=c ;//rgb(228,228,228);
|
||||
rc := rcDraw;
|
||||
rc[2]-= 6;
|
||||
dc.FillRect(rc);
|
||||
@@ -1783,7 +1789,7 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
||||
end
|
||||
function setguttercolor(c);
|
||||
begin
|
||||
if ifnumber(c) and c<>fguttercolor then
|
||||
if ifnumber(c) and c<>fguttercolor then
|
||||
begin
|
||||
fguttercolor := c;
|
||||
InvalidateRect(nil,false);
|
||||
@@ -1791,7 +1797,7 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
||||
end
|
||||
function setselectbkcolor(c);
|
||||
begin
|
||||
if ifnumber(c) and c<>fselectbkcolor then
|
||||
if c<>fselectbkcolor then
|
||||
begin
|
||||
fselectbkcolor := c;
|
||||
b1 := BlockBegin;
|
||||
@@ -2993,7 +2999,9 @@ type TSynCompletion = class(TSynCompletionList)
|
||||
end
|
||||
end
|
||||
end
|
||||
type TSynHighLighter = class(TComponent) //语法高亮类型
|
||||
type TSynHighLighter = class(TComponent) //语法高亮类型
|
||||
public
|
||||
hightercolor;
|
||||
type thtcolor = class()
|
||||
function create(cl);
|
||||
begin
|
||||
@@ -3262,6 +3270,15 @@ type tcustomsynhighlighter = class(TSynHighLighter)
|
||||
FChangeDeal := true;
|
||||
if fdolastline>=LastLine then return ;
|
||||
fdolastline := LastLine;
|
||||
if hightercolor then
|
||||
begin
|
||||
fsymcolor := hightercolor.symcolor();
|
||||
fnumbercolor := hightercolor.numcolor();
|
||||
fkeywordcolor := hightercolor.keycolor();
|
||||
fsysfuncolor := hightercolor.sysfunccolor();
|
||||
fstringcolor := hightercolor.strcolor();
|
||||
fannotationcolor := hightercolor.commentcolor();
|
||||
end
|
||||
for i := FSatesCount-1 to LastLine do
|
||||
begin
|
||||
if i<0 then continue;
|
||||
|
||||
Reference in New Issue
Block a user