From abf9796c82ec1e790dfe79890dffcaff5454a270 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Sat, 9 Jun 2018 09:59:39 +0000 Subject: [PATCH] tvplanit: Improved dragging of columns in VpContactGrid git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6478 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/tvplanit/source/vpconst.pas | 5 +++-- components/tvplanit/source/vpcontactgridpainter.pas | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/components/tvplanit/source/vpconst.pas b/components/tvplanit/source/vpconst.pas index a73a2f2c9..ac30630db 100644 --- a/components/tvplanit/source/vpconst.pas +++ b/components/tvplanit/source/vpconst.pas @@ -75,13 +75,14 @@ const MaxEventDepth = 50; { the maximum number of side by side } { events, which can be displayed in the } { DayView component. } - ClickDelay : Integer = 500; { the number of milliseconds of delay for } + ClickDelay: Integer = 500; { the number of milliseconds of delay for } { each event click in the TimeGrid } calDefHeight = 140; { popup calendar default height } calDefWidth = 200; { popup calendar default width } ExtraBarWidth = 2; { The extra, draggable area on either side } { of the Contact Grid's horizontal bars. } - CompareTimeEPS = 1.0 / (24*60*60*10); { Epsilon for time comparison, 0.1 sec } + CompareTimeEPS = 0.1 * OneSecond; { Epsilon for time comparison, 0.1 sec } +// CompareTimeEPS = 1.0 / (24*60*60*10); { Epsilon for time comparison, 0.1 sec } cmPerInch = 2.54; { 1 inch is 2.54 cm } diff --git a/components/tvplanit/source/vpcontactgridpainter.pas b/components/tvplanit/source/vpcontactgridpainter.pas index e12f141d9..649339ffa 100644 --- a/components/tvplanit/source/vpcontactgridpainter.pas +++ b/components/tvplanit/source/vpcontactgridpainter.pas @@ -724,7 +724,7 @@ begin TVpContactGridOpener(FContactGrid).cgBarArray[BarCount].Rec := Rect( BarPos - ExtraBarWidth, RealTop, - BarPos - ExtraBarWidth + FContactGrid.BarWidth, + BarPos + ExtraBarWidth + FContactGrid.BarWidth, RealBottom ); TVpContactGridOpener(FContactGrid).cgBarArray[BarCount].Index := BarCount;