mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-04 13:43:48 +02:00
synedit: clip gutter line numbers text by their drawing rectangle, update some gutter default values
git-svn-id: trunk@17632 -
This commit is contained in:
parent
3e57042c0f
commit
c928dcd787
@ -102,7 +102,7 @@ type
|
|||||||
property AutoSize: boolean read FAutoSize write SetAutoSize default False;
|
property AutoSize: boolean read FAutoSize write SetAutoSize default False;
|
||||||
property Color: TColor read FColor write SetColor default clBtnFace;
|
property Color: TColor read FColor write SetColor default clBtnFace;
|
||||||
property Cursor: TCursor read FCursor write FCursor default crDefault;
|
property Cursor: TCursor read FCursor write FCursor default crDefault;
|
||||||
property Width: integer read FWidth write SetWidth default 30;
|
property Width: integer read FWidth write SetWidth default 10;
|
||||||
property Visible: boolean read FVisible write SetVisible default True;
|
property Visible: boolean read FVisible write SetVisible default True;
|
||||||
property OnGutterClick: TGutterClickEvent
|
property OnGutterClick: TGutterClickEvent
|
||||||
read FOnGutterClick write FOnGutterClick;
|
read FOnGutterClick write FOnGutterClick;
|
||||||
@ -195,7 +195,7 @@ type
|
|||||||
default 16;
|
default 16;
|
||||||
// Forward to Code Folding
|
// Forward to Code Folding
|
||||||
property ShowCodeFolding: boolean read GetShowCodeFolding
|
property ShowCodeFolding: boolean read GetShowCodeFolding
|
||||||
write SetShowCodeFolding default FALSE;
|
write SetShowCodeFolding default False;
|
||||||
property CodeFoldingWidth: integer read GetCodeFoldingWidth write SetCodeFoldingWidth
|
property CodeFoldingWidth: integer read GetCodeFoldingWidth write SetCodeFoldingWidth
|
||||||
default 14;
|
default 14;
|
||||||
// Forward to Line Number
|
// Forward to Line Number
|
||||||
@ -211,7 +211,7 @@ type
|
|||||||
property LeadingZeros: boolean read GetLeadingZeros write SetLeadingZeros
|
property LeadingZeros: boolean read GetLeadingZeros write SetLeadingZeros
|
||||||
default FALSE;
|
default FALSE;
|
||||||
property DigitCount: integer read GetDigitCount write SetDigitCount
|
property DigitCount: integer read GetDigitCount write SetDigitCount
|
||||||
default 4;
|
default 2;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
@ -240,7 +240,7 @@ begin
|
|||||||
s := FormatLineNumber(iLine, ShowDot);
|
s := FormatLineNumber(iLine, ShowDot);
|
||||||
Inc(rcLine.Bottom, LineHeight);
|
Inc(rcLine.Bottom, LineHeight);
|
||||||
// erase the background and draw the line number string in one go
|
// erase the background and draw the line number string in one go
|
||||||
fTextDrawer.ExtTextOut(rcLine.Left, rcLine.Top, ETO_OPAQUE, rcLine,
|
fTextDrawer.ExtTextOut(rcLine.Left, rcLine.Top, ETO_OPAQUE or ETO_CLIPPED, rcLine,
|
||||||
PChar(Pointer(S)),Length(S));
|
PChar(Pointer(S)),Length(S));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user