You've already forked lazarus-ccr
tvplanit: Fix painting of GanttView events in hour mode.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8940 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -113,9 +113,14 @@ begin
|
||||
);
|
||||
OffsetRect(R, -dx, -dy);
|
||||
|
||||
if R.Right < FScaledFixedColWidth then
|
||||
exit;
|
||||
if R.Top < FScaledTotalColHeaderHeight then
|
||||
exit;
|
||||
|
||||
if R.Left < FScaledFixedColWidth then
|
||||
R.Left := FScaledFixedColWidth;
|
||||
|
||||
pw := RenderCanvas.Pen.Width;
|
||||
bs := RenderCanvas.Brush.Style;
|
||||
RenderCanvas.Pen.Width := 3;
|
||||
@ -350,7 +355,7 @@ var
|
||||
dx, dy: Integer;
|
||||
i, n, numEvents: Integer;
|
||||
eventRec: PVpGanttEventRec;
|
||||
dayRec: TVpGanttDayRec;
|
||||
// dayRec: TVpGanttDayRec;
|
||||
monthRec: TVpGanttMonthRec;
|
||||
R: TRect;
|
||||
begin
|
||||
@ -394,6 +399,7 @@ begin
|
||||
end;
|
||||
|
||||
// Vertical lines
|
||||
RenderCanvas.Brush.Style := bsClear;
|
||||
if (gvoVertGrid in FGanttView.Options) then
|
||||
begin
|
||||
y1 := RealTop + FScaledTotalColHeaderHeight;
|
||||
@ -402,11 +408,20 @@ begin
|
||||
eventRec := FGanttView.EventRecords[numEvents-1];
|
||||
R := ScaleRect(eventRec^.EventRect);
|
||||
y2 := R.Bottom - dy;
|
||||
n := FGanttView.NumDays;
|
||||
n := FGanttView.ColCount;
|
||||
for i := 0 to n-1 do
|
||||
begin
|
||||
dayRec := FGanttView.DayRecords[i];
|
||||
R := ScaleRect(dayRec.Rect);
|
||||
RenderCanvas.Pen.Style := psSolid;
|
||||
if FGanttView.HourMode then
|
||||
begin
|
||||
R := ScaleRect(FGanttView.HourRecords[i].Rect);
|
||||
if (i+1) mod FGanttView.HoursPerDay <> 0 then
|
||||
RenderCanvas.Pen.Style := psDot;
|
||||
end
|
||||
else
|
||||
R := ScaleRect(FGanttView.DayRecords[i].Rect);
|
||||
// dayRec := FGanttView.DayRecords[i];
|
||||
// R := ScaleRect(dayRec.Rect);
|
||||
x1 := R.Right - dx;
|
||||
if x1 >= FScaledFixedColWidth then
|
||||
begin
|
||||
|
Reference in New Issue
Block a user