You've already forked lazarus-ccr
tvplanit: draw month header dividing lines so that they do not run through week headers. Fix showing of month/week/day column headers.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8501 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1411,9 +1411,14 @@ begin
|
|||||||
SetLength(FMonthRecords, n);
|
SetLength(FMonthRecords, n);
|
||||||
if (Datastore = nil) or (Datastore.Resource = nil) then
|
if (Datastore = nil) or (Datastore.Resource = nil) then
|
||||||
exit;
|
exit;
|
||||||
|
if not (gchMonth in FColHeaderAttributes.Visible) then
|
||||||
|
exit;
|
||||||
|
|
||||||
x1 := FixedColWidth;
|
x1 := FixedColWidth;
|
||||||
y1 := 0;
|
y1 := 0;
|
||||||
|
if [gchWeek, gchDay] * FColHeaderAttributes.Visible = [gchWeek, gchDay] then
|
||||||
|
y2 := FMonthColHeaderHeight + FTextMargin
|
||||||
|
else
|
||||||
y2 := FTotalColHeaderHeight;
|
y2 := FTotalColHeaderHeight;
|
||||||
|
|
||||||
if n > 1 then
|
if n > 1 then
|
||||||
@ -1455,6 +1460,12 @@ var
|
|||||||
d: TVpDayType;
|
d: TVpDayType;
|
||||||
dt1, dt2: TDateTime;
|
dt1, dt2: TDateTime;
|
||||||
begin
|
begin
|
||||||
|
if not (gchWeek in FColHeaderAttributes.Visible) then
|
||||||
|
begin
|
||||||
|
SetLength(FWeekRecords, 0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
SetLength(FWeekRecords, GetNumWeeks);
|
SetLength(FWeekRecords, GetNumWeeks);
|
||||||
x1 := FixedColWidth;
|
x1 := FixedColWidth;
|
||||||
y1 := 0;
|
y1 := 0;
|
||||||
|
@ -196,6 +196,9 @@ var
|
|||||||
R, R1: TRect;
|
R, R1: TRect;
|
||||||
P: TPoint;
|
P: TPoint;
|
||||||
begin
|
begin
|
||||||
|
if not (gchDay in FGanttView.ColHeaderAttributes.Visible) then
|
||||||
|
exit;
|
||||||
|
|
||||||
// Offset due to scrolling
|
// Offset due to scrolling
|
||||||
dx := FGanttView.LeftCol * FScaledColWidth;
|
dx := FGanttView.LeftCol * FScaledColWidth;
|
||||||
|
|
||||||
@ -236,7 +239,8 @@ begin
|
|||||||
|
|
||||||
// No dividing line at last day of month because it already has been
|
// No dividing line at last day of month because it already has been
|
||||||
// drawn as the month divider.
|
// drawn as the month divider.
|
||||||
if (DayOf(dayRec.Date) <> DaysInMonth(dayRec.Date)) then
|
if (DayOf(dayRec.Date) <> DaysInMonth(dayRec.Date)) or
|
||||||
|
([gchWeek, gchDay] * FGanttView.ColHeaderAttributes.Visible = [gchWeek, gchDay]) then
|
||||||
begin
|
begin
|
||||||
if FGanttView.DrawingStyle = ds3D then
|
if FGanttView.DrawingStyle = ds3D then
|
||||||
DrawBevelLine(
|
DrawBevelLine(
|
||||||
@ -405,6 +409,9 @@ var
|
|||||||
str: String;
|
str: String;
|
||||||
strLen: Integer;
|
strLen: Integer;
|
||||||
begin
|
begin
|
||||||
|
if not (gchMonth in FGanttView.ColHeaderAttributes.Visible) then
|
||||||
|
exit;
|
||||||
|
|
||||||
// Offset due to scrolling
|
// Offset due to scrolling
|
||||||
dx := FGanttView.LeftCol * FScaledColWidth;
|
dx := FGanttView.LeftCol * FScaledColWidth;
|
||||||
|
|
||||||
@ -593,6 +600,9 @@ var
|
|||||||
str: String;
|
str: String;
|
||||||
strLen: Integer;
|
strLen: Integer;
|
||||||
begin
|
begin
|
||||||
|
if not (gchWeek in FGanttView.ColHeaderAttributes.Visible) then
|
||||||
|
exit;
|
||||||
|
|
||||||
// Offset due to scrolling
|
// Offset due to scrolling
|
||||||
dx := FGanttView.LeftCol * FScaledColWidth;
|
dx := FGanttView.LeftCol * FScaledColWidth;
|
||||||
|
|
||||||
@ -624,14 +634,6 @@ begin
|
|||||||
BevelShadow,
|
BevelShadow,
|
||||||
BevelHighlight
|
BevelHighlight
|
||||||
)
|
)
|
||||||
(*
|
|
||||||
DrawBevelRect(
|
|
||||||
RenderCanvas,
|
|
||||||
TPSRotateRectangle(Angle, RenderIn, R1),
|
|
||||||
BevelHighlight,
|
|
||||||
BevelShadow
|
|
||||||
)
|
|
||||||
*)
|
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
TPSMoveTo(RenderCanvas, Angle, RenderIn, R.Right, R.Top);
|
TPSMoveTo(RenderCanvas, Angle, RenderIn, R.Right, R.Top);
|
||||||
|
Reference in New Issue
Block a user