mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 23:00:35 +02:00
LCL: Optimize Treeview code a little. Issue #31882, patch from AlexeyT.
git-svn-id: trunk@55029 -
This commit is contained in:
parent
3ea7d0a0f9
commit
c2b1fef6d5
@ -4939,7 +4939,7 @@ var
|
||||
(ttHotGlyphClosed, ttHotGlyphOpened)
|
||||
);
|
||||
var
|
||||
HalfSize, ALeft, ATop, ARight, ABottom: integer;
|
||||
HalfSize, ALeft, ATop, ARight, ABottom, SmallIndent: integer;
|
||||
Points: array[0..2] of TPoint; // for triangle
|
||||
Details: TThemedElementDetails;
|
||||
R: TRect;
|
||||
@ -4978,12 +4978,13 @@ var
|
||||
// draw a plus or a minus sign
|
||||
R := Rect(ALeft, ATop, ARight+1, ABottom+1); //+1 for centering of line in square
|
||||
Rectangle(R);
|
||||
MoveTo(R.Left + Scale96ToFont(2), MidY);
|
||||
LineTo(R.Right - Scale96ToFont(2), MidY);
|
||||
SmallIndent := Scale96ToFont(2);
|
||||
MoveTo(R.Left + SmallIndent, MidY);
|
||||
LineTo(R.Right - SmallIndent, MidY);
|
||||
if not CollapseSign then
|
||||
begin
|
||||
MoveTo(MidX, R.Top + Scale96ToFont(2));
|
||||
LineTo(MidX, R.Bottom - Scale96ToFont(2));
|
||||
MoveTo(MidX, R.Top + SmallIndent);
|
||||
LineTo(MidX, R.Bottom - SmallIndent);
|
||||
end;
|
||||
end;
|
||||
tvestArrow,
|
||||
|
Loading…
Reference in New Issue
Block a user