SynEdit icon indicating copy to clipboard operation
SynEdit copied to clipboard

Support for Almost Borderless Completionproposal

Open Memnarch opened this issue 7 years ago • 1 comments

Using SetWindowLong i removed the default border from CompletionProposal and use

BorderWidth := 1 Instead to create a VS2015 like popup. However deep down theere is a Hardcoded Heightcalculation which will no longer work.

SynCompletionProposal.pas

    [...]
    tmpX := x;
    tmpY := y;
    tmpWidth := 0;
    tmpHeight := 0;
    case Kind of
    ctCode:
      begin
        BorderWidth :=
          {$IFDEF SYN_CLX}
          6; // TODO: I don't know how to retrieve the border width in CLX
          {$ELSE}
          2 \* GetSystemMetrics(SM_CYSIZEFRAME);
          {$ENDIF}
    tmpWidth := FWidth;
    tmpHeight := Form.FHeightBuffer + Form.FEffectiveItemHeight * FNbLinesInWindow + BorderWidth;
  end;

This needs some kind of customization. Maybe a more basic BaseClass of CompletionProposal to allow more custom stuff?

Memnarch avatar Jul 18 '16 14:07 Memnarch

This is obsolete and can be closed; Setting CompletionProposal.Resizable := False in the current version will create a window with a thin border.

andersmelander avatar Sep 18 '23 22:09 andersmelander