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:
paul 2008-11-30 03:56:33 +00:00
parent 3e57042c0f
commit c928dcd787
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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;