mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 23:00:27 +02:00
LCL: TCustomHeader: do not draw rects which have width <= 0.fixes issue #17340
git-svn-id: trunk@28465 -
This commit is contained in:
parent
091d03bee1
commit
04fe47ca23
@ -345,8 +345,11 @@ begin
|
||||
|
||||
if Sections.Count > 0 then
|
||||
FPaintRect.Left := Sections[Sections.Count - 1].Right;
|
||||
Details := ThemeServices.GetElementDetails(thHeaderItemRightNormal);
|
||||
ThemeServices.DrawElement(Canvas.Handle, Details, FPaintRect);
|
||||
if FPaintRect.Left < FPaintRect.Right then
|
||||
begin
|
||||
Details := ThemeServices.GetElementDetails(thHeaderItemRightNormal);
|
||||
ThemeServices.DrawElement(Canvas.Handle, Details, FPaintRect);
|
||||
end;
|
||||
|
||||
if FDragging then
|
||||
begin
|
||||
@ -384,7 +387,8 @@ begin
|
||||
ARect := FPaintRect;
|
||||
ARect.Left := FPaintRect.Left + Section.Left;
|
||||
ARect.Right := FPaintRect.Left + Section.Right;
|
||||
|
||||
if ARect.Right <= ARect.Left then
|
||||
exit;
|
||||
Details := ThemeServices.GetElementDetails(HeaderStateMap[Section.State]);
|
||||
|
||||
ThemeServices.DrawElement(Canvas.Handle, Details, ARect);
|
||||
|
Loading…
Reference in New Issue
Block a user