From dbfe4e3ba4b7729333e249d801dc3b02a3ee2487 Mon Sep 17 00:00:00 2001 From: martin Date: Sat, 14 Jul 2018 10:27:20 +0000 Subject: [PATCH] SynEdit: overview gutter pen.width for drawing depend on PPI git-svn-id: trunk@58517 - --- components/synedit/syngutterlineoverview.pp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/synedit/syngutterlineoverview.pp b/components/synedit/syngutterlineoverview.pp index 2bf6a173f3..f92d6b769b 100644 --- a/components/synedit/syngutterlineoverview.pp +++ b/components/synedit/syngutterlineoverview.pp @@ -290,6 +290,7 @@ type FLineMarks: TSynGutterLOvLineMarksList; FMouseActionsForMarks: TSynEditMouseInternalActions; FState: TSynGutterLOvStateFlags; + FPpiPenWidth: Integer; function GetMarkHeight: Integer; function GetMouseActionsForMarks: TSynEditMouseActions; procedure SetMarkHeight(const AValue: Integer); @@ -1471,6 +1472,8 @@ begin AClip.Right := Width; FWinControl.Canvas.Brush.Color := MarkupInfo.Background; FWinControl.Canvas.FillRect(AClip); + FWinControl.Canvas.Pen.Width := FPpiPenWidth; + FWinControl.Canvas.Pen.JoinStyle := pjsMiter; for i := 0 to Providers.Count - 1 do Providers[i].Paint(FWinControl.Canvas, AClip, 0); @@ -1482,6 +1485,7 @@ end; constructor TSynGutterLineOverview.Create(AOwner: TComponent); begin inherited Create(AOwner); + FPpiPenWidth := 1; FMouseActionsForMarks := TSynEditMouseInternalActions.Create(Self); end; @@ -1542,6 +1546,7 @@ end; procedure TSynGutterLineOverview.ScalePPI(const AScaleFactor: Double); begin FLineMarks.ItemHeight := Round(FLineMarks.ItemHeight*AScaleFactor); + FPpiPenWidth := Max(1, Scale96ToFont(1)); inherited ScalePPI(AScaleFactor); end;