Recent

Author Topic: Lazarus 1.8.4 IDE/editor problems  (Read 1233 times)

fcs

  • New member
  • *
  • Posts: 6
Re: Lazarus 1.8.4 IDE/editor problems
« Reply #15 on: March 12, 2019, 08:03:08 pm »
Hi,

I changed two procedures:

1. SourceEditor.pp

procedure TSourceEditCompletion.ccExecute(Sender: TObject);
// init completion form
// called by OnExecute just before showing
var
  S: TStrings;
  Prefix: String;
  I: Integer;
  NewStr: String;
Begin
  {$IFDEF VerboseIDECompletionBox}
  debugln(['TSourceEditCompletion.ccExecute START']);
  {$ENDIF}
  TheForm.Font := Editor.Font;

  //FActiveEditDefaultFGColor  := Editor.Font.Color;
  //FActiveEditDefaultBGColor  := Editor.Color;
  //FActiveEditSelectedFGColor := TSynEdit(Editor).SelectedColor.Foreground;
  //FActiveEditSelectedBGColor := TSynEdit(Editor).SelectedColor.Background;

  FActiveEditDefaultFGColor  := clWhite;
  FActiveEditDefaultBGColor  := $004F2700;
  FActiveEditSelectedFGColor := clWhite;
  FActiveEditSelectedBGColor := clNavy;   



2. SourceEditProcs.pp

function PaintCompletionItem(const AKey: string; ACanvas: TCanvas;
  X, Y, MaxX: integer; ItemSelected: boolean; Index: integer;
  aCompletion : TSynCompletion; CurrentCompletionType: TCompletionType;
  Highlighter: TSrcIDEHighlighter; MeasureOnly: Boolean): TPoint;

line 378

 // paint the identifier
    SetFontColor(ForegroundColor);
   // ACanvas.Font.Style:=ACanvas.Font.Style+[fsBold];

And the result is like bellow (jpg compression degrades colors).

I think,  this solves my problem.

Thanks Martin_fr for pointing the unit which is drawing items :)

Regards
Michal