mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 21:38:00 +02:00
IDE, SynEdit: fix configuring column count for gutter-marks
This commit is contained in:
parent
46516b161f
commit
7400dc43b0
@ -32,7 +32,7 @@ type
|
||||
function PaintMarks(aScreenLine: Integer; Canvas : TCanvas; AClip : TRect;
|
||||
var aFirstCustomColumnIdx: integer): Boolean;
|
||||
Procedure PaintLine(aScreenLine: Integer; Canvas : TCanvas; AClip : TRect); virtual;
|
||||
|
||||
property WantedColumns: integer read FWantedColumns;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
|
@ -2356,12 +2356,15 @@ end;
|
||||
function TIDESynGutterMarks.PreferedWidthAtCurrentPPI: Integer;
|
||||
var
|
||||
img: TScaledImageListResolution;
|
||||
c: Integer;
|
||||
begin
|
||||
if Assigned(SourceEditorMarks) and Assigned(SourceEditorMarks.ImgList) then
|
||||
begin
|
||||
c := WantedColumns;
|
||||
if c <= 0 then c := 2;
|
||||
img := GetImgListRes(nil, SourceEditorMarks.ImgList);
|
||||
// + 1 => right margin
|
||||
Result := img.Width * 2 + LeftMarginAtCurrentPPI + Scale96ToFont(1);
|
||||
Result := img.Width * c + LeftMarginAtCurrentPPI + Scale96ToFont(1);
|
||||
end else
|
||||
Result := inherited PreferedWidthAtCurrentPPI;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user