mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 19:39:17 +02:00
TAChart: Fix TChartListbox using more than 1 column, issue #39439
This commit is contained in:
parent
6422aaa213
commit
c3f0740005
@ -257,10 +257,10 @@ begin
|
|||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ Based on the rect of a listbox item, calculates the locations of the
|
||||||
|
checkbox and of the series icon }
|
||||||
procedure TChartListbox.CalcRects(
|
procedure TChartListbox.CalcRects(
|
||||||
const AItemRect: TRect; out ACheckboxRect, ASeriesIconRect: TRect);
|
const AItemRect: TRect; out ACheckboxRect, ASeriesIconRect: TRect);
|
||||||
{ based on the rect of a listbox item, calculates the locations of the
|
|
||||||
checkbox and of the series icon }
|
|
||||||
const
|
const
|
||||||
MARGIN = 4;
|
MARGIN = 4;
|
||||||
var
|
var
|
||||||
@ -274,11 +274,7 @@ begin
|
|||||||
ACheckBoxRect := Rect(0, 0, FCheckboxSize.CX, FCheckboxSize.CY);
|
ACheckBoxRect := Rect(0, 0, FCheckboxSize.CX, FCheckboxSize.CY);
|
||||||
OffsetRect(ACheckboxRect, x, (AItemRect.Top + AItemRect.Bottom - FCheckboxSize.CY) div 2);
|
OffsetRect(ACheckboxRect, x, (AItemRect.Top + AItemRect.Bottom - FCheckboxSize.CY) div 2);
|
||||||
if cloShowIcons in Options then
|
if cloShowIcons in Options then
|
||||||
x += ACheckboxRect.Right;
|
x := ACheckboxRect.Right + MARGIN;
|
||||||
end
|
|
||||||
else begin
|
|
||||||
if cloShowIcons in Options then
|
|
||||||
x += AItemRect.Left;
|
|
||||||
end;
|
end;
|
||||||
if cloShowIcons in Options then
|
if cloShowIcons in Options then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user