mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 17:20:56 +02:00
LCL: TTreeView: Win32 Fixed warning TResourceCacheItem.IncreaseRefCount 1000 TPenHandleCache. Issue #30661
git-svn-id: trunk@55118 -
This commit is contained in:
parent
9ce286c99d
commit
dd3f611b28
@ -3315,6 +3315,7 @@ type
|
||||
FTopItem: TTreeNode;
|
||||
FTreeLineColor: TColor;
|
||||
FTreeLinePenStyle: TPenStyle;
|
||||
FTreeLinePenPattern: TPenPattern;
|
||||
FExpandSignColor : TColor;
|
||||
FTreeNodes: TTreeNodes;
|
||||
FHintWnd: THintWindow;
|
||||
|
@ -3264,6 +3264,9 @@ begin
|
||||
FStates:=[tvsMaxLvlNeedsUpdate,tvsMaxRightNeedsUpdate,tvsScrollbarChanged];
|
||||
FTreeLineColor := clWindowFrame;
|
||||
FTreeLinePenStyle := psPattern;
|
||||
SetLength(FTreeLinePenPattern, 2);
|
||||
FTreeLinePenPattern[0] := 1;
|
||||
FTreeLinePenPattern[1] := 1;
|
||||
FExpandSignColor := clWindowFrame;
|
||||
// Accessibility
|
||||
AccessibleDescription := rsTTreeViewAccessibilityDescription;
|
||||
@ -5220,6 +5223,8 @@ begin
|
||||
// draw tree lines
|
||||
Pen.Color := TreeLineColor;
|
||||
Pen.Style := TreeLinePenStyle;
|
||||
if Pen.Style = psPattern then
|
||||
Pen.SetPattern(FTreeLinePenPattern);
|
||||
x := DrawTreeLines(Node);
|
||||
Pen.Style := psSolid;
|
||||
|
||||
|
@ -1352,6 +1352,11 @@ begin
|
||||
LB.lbColor := ColorToRGB(TColor(lplb.lbColor));
|
||||
LB.lbHatch := lplb.lbHatch;
|
||||
Result := Windows.ExtCreatePen(dwPenStyle, dwWidth, LB, dwStyleCount, lpStyle);
|
||||
|
||||
// Note Michl: When style PS_USERSTYLE is used, lpStyle can't be nil, there
|
||||
// must be dwSytleCount >= 1, see issue #30661
|
||||
if Result = 0 then
|
||||
DebugLn('TWin32WidgetSet.ExtCreatePen returns 0. Reason = ' + GetLastErrorText(Windows.GetLastError));
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user