diff --git a/components/tvplanit/source/vpdayviewpainter.pas b/components/tvplanit/source/vpdayviewpainter.pas index d912fbf03..20dcc82e2 100644 --- a/components/tvplanit/source/vpdayviewpainter.pas +++ b/components/tvplanit/source/vpdayviewpainter.pas @@ -1106,31 +1106,31 @@ begin if FDayView.WrapStyle = wsIconFlow then begin {$IFDEF REGION_SUPPORT} - WorkRegion1 := CreateRectRgn(AIconRect.Right, AEventRect.Top, AEventRect.Right, AIconRect.Bottom); + WorkRegion1 := CreateRectRgn(AIconRect.Right + FScaledTextMargin, AEventRect.Top, AEventRect.Right, AIconRect.Bottom); WorkRegion2 := CreateRectRgn(AEventRect.Left + FScaledGutterWidth, AIconRect.Bottom, AEventRect.Right, AEventRect.Bottom); TextRegion := CreateRectRgn(AIconRect.Right, AEventRect.Top, AEventRect.Right, AIconRect.Bottom); CombineRgn(TextRegion, WorkRegion1, WorkRegion2, RGN_OR); {$ELSE} SetLength(TextRects, 2); - TextRects[0] := Rect(AIconRect.Right, AEventRect.Top, AEventRect.Right, AIconRect.Bottom); + TextRects[0] := Rect(AIconRect.Right + FScaledTextMargin, AEventRect.Top, AEventRect.Right, AIconRect.Bottom); TextRects[1] := Rect(AEventRect.Left + FScaledGutterWidth, AIconRect.Bottom, AEventRect.Right, AEventRect.Bottom); {$ENDIF} end else begin {$IFDEF REGION_SUPPORT} - TextRegion := CreateRectRgn(AIconRect.Right, AEventRect.Top, AEventRect.Right, AEventRect.Bottom); + TextRegion := CreateRectRgn(AIconRect.Right + FScaledTextMargin, AEventRect.Top, AEventRect.Right, AEventRect.Bottom); {$ELSE} SetLength(TextRects, 1); - TextRects[0] := Rect(AIconRect.Right, AEventRect.Top, AEventRect.Right, AEventRect.Bottom); + TextRects[0] := Rect(AIconRect.Right + FScaledTextMargin, AEventRect.Top, AEventRect.Right, AEventRect.Bottom); {$ENDIF} end; end else begin {$IFDEF REGION_SUPPORT} - TextRegion := CreateRectRgn(AIconRect.Right + FScaledGutterWidth, AEventRect.Top, AEventRect.Right, AEventRect.Bottom); + TextRegion := CreateRectRgn(AIconRect.Right + FScaledTextmargin, AEventRect.Top, AEventRect.Right, AEventRect.Bottom); {$ELSE} SetLength(TextRects, 1); - TextRects[0] := Rect(AIconRect.Right + FScaledGutterWidth, AEventRect.Top, AEventRect.Right, AEventRect.Bottom); + TextRects[0] := Rect(AIconRect.Right + FScaledTextMargin, AEventRect.Top, AEventRect.Right, AEventRect.Bottom); {$ENDIF} end; @@ -1167,7 +1167,7 @@ begin TPSTextOut(RenderCanvas, // wp: both cases are the same ?! Angle, RenderIn, - AIconRect.Right + FScaledGutterWidth + FScaledTextMargin, + AIconRect.Right + FScaledTextMargin, AEventRect.Top + FScaledTextMargin, AText )