mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 14:39:13 +02:00
SynEdit: overview gutter pen.width for drawing depend on PPI
git-svn-id: trunk@58517 -
This commit is contained in:
parent
ed902001ff
commit
dbfe4e3ba4
@ -290,6 +290,7 @@ type
|
|||||||
FLineMarks: TSynGutterLOvLineMarksList;
|
FLineMarks: TSynGutterLOvLineMarksList;
|
||||||
FMouseActionsForMarks: TSynEditMouseInternalActions;
|
FMouseActionsForMarks: TSynEditMouseInternalActions;
|
||||||
FState: TSynGutterLOvStateFlags;
|
FState: TSynGutterLOvStateFlags;
|
||||||
|
FPpiPenWidth: Integer;
|
||||||
function GetMarkHeight: Integer;
|
function GetMarkHeight: Integer;
|
||||||
function GetMouseActionsForMarks: TSynEditMouseActions;
|
function GetMouseActionsForMarks: TSynEditMouseActions;
|
||||||
procedure SetMarkHeight(const AValue: Integer);
|
procedure SetMarkHeight(const AValue: Integer);
|
||||||
@ -1471,6 +1472,8 @@ begin
|
|||||||
AClip.Right := Width;
|
AClip.Right := Width;
|
||||||
FWinControl.Canvas.Brush.Color := MarkupInfo.Background;
|
FWinControl.Canvas.Brush.Color := MarkupInfo.Background;
|
||||||
FWinControl.Canvas.FillRect(AClip);
|
FWinControl.Canvas.FillRect(AClip);
|
||||||
|
FWinControl.Canvas.Pen.Width := FPpiPenWidth;
|
||||||
|
FWinControl.Canvas.Pen.JoinStyle := pjsMiter;
|
||||||
|
|
||||||
for i := 0 to Providers.Count - 1 do
|
for i := 0 to Providers.Count - 1 do
|
||||||
Providers[i].Paint(FWinControl.Canvas, AClip, 0);
|
Providers[i].Paint(FWinControl.Canvas, AClip, 0);
|
||||||
@ -1482,6 +1485,7 @@ end;
|
|||||||
constructor TSynGutterLineOverview.Create(AOwner: TComponent);
|
constructor TSynGutterLineOverview.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
|
FPpiPenWidth := 1;
|
||||||
FMouseActionsForMarks := TSynEditMouseInternalActions.Create(Self);
|
FMouseActionsForMarks := TSynEditMouseInternalActions.Create(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1542,6 +1546,7 @@ end;
|
|||||||
procedure TSynGutterLineOverview.ScalePPI(const AScaleFactor: Double);
|
procedure TSynGutterLineOverview.ScalePPI(const AScaleFactor: Double);
|
||||||
begin
|
begin
|
||||||
FLineMarks.ItemHeight := Round(FLineMarks.ItemHeight*AScaleFactor);
|
FLineMarks.ItemHeight := Round(FLineMarks.ItemHeight*AScaleFactor);
|
||||||
|
FPpiPenWidth := Max(1, Scale96ToFont(1));
|
||||||
inherited ScalePPI(AScaleFactor);
|
inherited ScalePPI(AScaleFactor);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user