From 807a5140d79ec4f0178f0a2b4b0dddf60c5a8817 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Thu, 6 Oct 2022 11:11:32 +0000 Subject: [PATCH] tvplanit: No partial tasks in the last line of a page in the print-out. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8515 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/tvplanit/source/vptasklistpainter.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/tvplanit/source/vptasklistpainter.pas b/components/tvplanit/source/vptasklistpainter.pas index ab8f892d5..06185cd34 100644 --- a/components/tvplanit/source/vptasklistpainter.pas +++ b/components/tvplanit/source/vptasklistpainter.pas @@ -94,7 +94,7 @@ var d2: Integer; // 2*Scale {%H-}d1px, {%H-}d2px, d3px: Integer; begin - tm := Round(FTaskList.TextMargin * Scale); + tm := FScaledTextMargin; {$IF VP_LCL_SCALING > 0} d1px := FTasklist.Scale96ToFont(1); @@ -376,7 +376,7 @@ begin {$ENDIF} for I := StartLine to pred(tlAllTaskList.Count) do begin task := tlAllTaskList[I]; - if (LineRect.Top + Trunc(RowHeight * 0.5) <= RealBottom) then begin + if (LineRect.Bottom <= RealBottom) then begin // If this is the selected task and we are not in edit mode, // then set background selection. if (task = FActiveTask) and