From 4f2302a941520574341557a289fe1d1fae1fb0dd Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Fri, 24 Jun 2016 19:10:59 +0000 Subject: [PATCH] tvplanit: Fix DayView in-place editor reaching into adjacent column git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4826 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/tvplanit/examples/demo/demomain.lfm | 2 +- components/tvplanit/source/vpdayview.pas | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/tvplanit/examples/demo/demomain.lfm b/components/tvplanit/examples/demo/demomain.lfm index fed522113..77e2a4ac9 100644 --- a/components/tvplanit/examples/demo/demomain.lfm +++ b/components/tvplanit/examples/demo/demomain.lfm @@ -149,7 +149,7 @@ object MainForm: TMainForm } ShowResourceName = True LineColor = clGray - GutterWidth = 7 + GutterWidth = 5 DateLabelFormat = 'dddd, mmmm dd, yyyy' Granularity = gr30Min DefaultTopHour = h_07 diff --git a/components/tvplanit/source/vpdayview.pas b/components/tvplanit/source/vpdayview.pas index df7bcad20..56276df49 100644 --- a/components/tvplanit/source/vpdayview.pas +++ b/components/tvplanit/source/vpdayview.pas @@ -1866,7 +1866,7 @@ begin dvActiveEventRec.Bottom := 0; dvActiveEventRec.Right := 0; dvActiveEventRec.Left := 0; - dvActiveIconRec := Rect (0, 0, 0, 0); + dvActiveIconRec := Rect (0, 0, 0, 0); Exit; end; if (Point.X > dvEventArray[I].Rec.Left) and @@ -1945,10 +1945,10 @@ begin dvInPlaceEditor.OnExit := EndEdit; end; dvInPlaceEditor.SetBounds( - dvActiveIconRec.Right + FGutterWidth + TextMargin, + dvActiveIconRec.Left + FGutterWidth + TextMargin, dvActiveEventRec.Top + TextMargin, - dvActiveEventRec.Right, - dvActiveEventRec.Bottom - 1 + dvActiveEventRec.Right - dvActiveIconRec.Left - FGutterWidth - TextMargin, + dvActiveEventRec.Bottom - dvActiveEventRec.Top - TextMargin ); dvInPlaceEditor.Show; dvInPlaceEditor.Text := FActiveEvent.Description;