You've already forked lazarus-ccr
tvplanit: Allow to draw all-day events in the category color (CategoryInfo.UseForAllDayEvents).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8394 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -308,6 +308,7 @@ var
|
||||
AllDayWidth: Integer;
|
||||
OldTop: LongInt;
|
||||
txtDist: Integer;
|
||||
cat: TVpCategoryInfo;
|
||||
begin
|
||||
// Initialize the rectangle to be used for all-day events
|
||||
ADEventsRect := InitAllDayEventsRect;
|
||||
@ -397,8 +398,16 @@ begin
|
||||
AdEvRect.Left := AdEventsRect.Left + DayWidth * I + txtDist;
|
||||
AdEvRect.Right := AdEventsRect.Left + DayWidth * (I + 1) - txtDist;
|
||||
|
||||
RenderCanvas.Brush.Color := ADEventAttrBkgColor;
|
||||
RenderCanvas.Pen.Color := ADEventBorderColor;
|
||||
cat := FDayView.Datastore.CategoryColorMap.GetCategory(Event.Category);
|
||||
if cat.UseForAllDayEvents then
|
||||
begin
|
||||
RenderCanvas.Brush.Color := cat.BackgroundColor;
|
||||
RenderCanvas.Pen.Color := cat.Color;
|
||||
end else
|
||||
begin
|
||||
RenderCanvas.Brush.Color := ADEventAttrBkgColor;
|
||||
RenderCanvas.Pen.Color := ADEventBorderColor;
|
||||
end;
|
||||
TPSRectangle(RenderCanvas, Angle, RenderIn,
|
||||
ADEvRect.Left + txtDist,
|
||||
ADEvRect.Top + txtDist,
|
||||
|
Reference in New Issue
Block a user