IDE: word completion box: fixed inverting font color on dark background

git-svn-id: trunk@57548 -
This commit is contained in:
mattias 2018-03-22 10:16:39 +00:00
parent bc26b5cd5f
commit 18798b306b

View File

@ -291,8 +291,12 @@ begin
AllowFontColor := True;
end;
BackgroundColor:=ColorToRGB(ACanvas.Brush.Color);
BGRed:=(BackgroundColor shr 16) and $ff;
BGGreen:=(BackgroundColor shr 8) and $ff;
BGBlue:=BackgroundColor and $ff;
ForegroundColor := ColorToRGB(ForegroundColor);
ACanvas.Font.Color := ForegroundColor;
SetFontColor(ForegroundColor);
Result.X := 0;
Result.Y := ACanvas.TextHeight('W');
@ -306,10 +310,6 @@ begin
end;
IdentItem.BeautifyIdentifier(CodeToolBoss.IdentifierList);
ItemNode:=IdentItem.Node;
BackgroundColor:=ColorToRGB(ACanvas.Brush.Color);
BGRed:=(BackgroundColor shr 16) and $ff;
BGGreen:=(BackgroundColor shr 8) and $ff;
BGBlue:=BackgroundColor and $ff;
ImageIndex:=-1;
ImageIndexCC := -1;
UseImages := CodeToolsOpts.IdentComplShowIcons;
@ -679,9 +679,10 @@ begin
begin
WriteToken(TokenStart,i);
// set color
ACanvas.Font.Color := (Ord(AKey[i + 3]) shl 8
+ Ord(AKey[i + 2])) shl 8
+ Ord(AKey[i + 1]);
ForegroundColor:=(Ord(AKey[i + 3]) shl 8
+ Ord(AKey[i + 2])) shl 8
+ Ord(AKey[i + 1]);
SetFontColor(ForegroundColor);
inc(i, 4);
end;
#3: