tvplanit/TVpGanttView: Double-click. Fix scrolling when size is changed.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8425 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2022-08-29 18:34:35 +00:00
parent ab7800349c
commit 89b96e9392
2 changed files with 79 additions and 267 deletions

View File

@ -329,9 +329,11 @@ var
begin
RenderCanvas.Pen.Color := RealLineColor;
dx := FGanttView.LeftCol * FGanttView.ColWidth;
dy := FGanttView.TopRow * FGanttView.RowHeight;
// Horizontal lines
x1 := RealLeft + FGanttView.FixedColWidth;
dx := FGanttView.LeftCol * FGanttView.ColWidth;
n := FGanttView.NumMonths;
if n > 0 then
begin
@ -343,19 +345,19 @@ begin
if FGanttView.DrawingStyle = ds3D then dec(y0);
RenderCanvas.Line(x1, y0, x2, y0);
y0 := 0;
y0 := -dy;
if FGanttView.DrawingStyle = ds3D then dec(y0);
numEvents := FGanttView.NumEvents;
for i := 0 to numEvents - 1 do
begin
eventRec := FGanttView.EventRecords[i];
y1 := y0 + eventRec.EventRect.Bottom;
RenderCanvas.Line(x1, y1, x2, y1);
if y1 >= FGanttView.TotalColHeaderHeight then
RenderCanvas.Line(x1, y1, x2, y1);
end;
// Vertical lines
y1 := RealTop + FGanttView.TotalColHeaderHeight;
dy := FGanttView.TopRow * FGanttView.RowHeight;
if numEvents > 0 then
begin
eventRec := FGanttView.EventRecords[numEvents-1];