You've already forked lazarus-ccr
tvplanit: Add new parameter AGutterRect to the OnBeforeDrawEvent and OnAfterDrawEvent events of TVpDayView (issue #33748)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6425 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -96,10 +96,10 @@ type
|
||||
TVpDVIcons = array [itAlarm..itCustom] of TVpDVIconData;
|
||||
|
||||
TVpOnDVBeforeDrawEvent = procedure (Sender: TObject; Event: TVpEvent;
|
||||
Active: Boolean; ACanvas: TCanvas; EventRect: TRect; IconRect: TRect) of object;
|
||||
AActive: Boolean; ACanvas: TCanvas; AGutterRect, AEventRect, AIconRect: TRect) of object;
|
||||
|
||||
TVpOnDVAfterDrawEvent = procedure (Sender: TObject; Event: TVpEvent;
|
||||
Active: Boolean; ACanvas: TCanvas; EventRect: TRect; IconRect: TRect) of object;
|
||||
AActive: Boolean; ACanvas: TCanvas; AGutterRect, AEventRect, AIconRect: TRect) of object;
|
||||
|
||||
TVpOnDVDrawIcons = procedure (Sender: TObject; Event: TVpEvent;
|
||||
var Icons: TVpDVIcons) of object;
|
||||
|
@ -843,7 +843,8 @@ begin
|
||||
tmpRect := EventRect;
|
||||
if (AEventRec.Level <> 0) then
|
||||
inc(tmpRect.Left, FDayView.GutterWidth);
|
||||
FDayView.OnBeforeDrawEvent(Self, AEvent, FDayView.ActiveEvent = AEvent, RenderCanvas, tmpRect, IconRect);
|
||||
FDayView.OnBeforeDrawEvent(Self, AEvent, FDayView.ActiveEvent = AEvent,
|
||||
RenderCanvas, GutterRect, tmpRect, IconRect);
|
||||
end;
|
||||
|
||||
if FDayView.IconAttributes.ShowInPrint then
|
||||
@ -882,7 +883,8 @@ begin
|
||||
tmpRect := EventRect;
|
||||
if (AEventRec.Level <> 0) then
|
||||
inc(tmpRect.Left, FDayView.GutterWidth);
|
||||
FDayView.OnAfterDrawEvent(Self, AEvent, FDayView.ActiveEvent = AEvent, RenderCanvas, tmpRect, IconRect);
|
||||
FDayView.OnAfterDrawEvent(Self, AEvent, FDayView.ActiveEvent = AEvent,
|
||||
RenderCanvas, GutterRect, tmpRect, IconRect);
|
||||
end;
|
||||
|
||||
RenderCanvas.Brush.Assign(OldBrush); // wp: Original code had "Canvas" here which does not look correct.
|
||||
@ -1910,7 +1912,9 @@ begin
|
||||
{ added because level 0 events were one pixel too far to the right }
|
||||
else
|
||||
AEventRect.Left := AEventRect.Left - 1;
|
||||
AEventRect.Right := AEventRect.Left + eventWidth + 1;
|
||||
AEventRect.Right := AEventRect.Left + eventWidth;; // + 1; -- wp: removed to avoid painting over the right border line
|
||||
|
||||
dec(AEventRect.Top); // wp: without this, the top border line of the event is thicker than the others
|
||||
end;
|
||||
|
||||
{ remove the date portion from the start and end times }
|
||||
|
Reference in New Issue
Block a user