[Lazarus] Comment about new LCL diff
Alexey
aaa5500 at ya.ru
Mon Jul 3 14:37:45 CEST 2017
+function TDragManagerDefault.IsCanBeStartDragging(Site: TWinControl;
AThreshold: Integer; X,Y:Integer): boolean;
+var
+ Threshold:integer;
+ aRect:TRect;
+begin
+ if AThreshold<=0 then
+ Threshold:=DragThreshold
+ else
+ Threshold:=AThreshold;
+ aRect := Site.ClientRect;
+ InflateRect(aRect, Threshold, Threshold);
+ if not PtInRect(aRect, Point(X, Y)) then
+ Result:=true
+ else
+ Result:=false;
+end;
1) name IsCanNNN, and even worse IsCanBeNNN. Pls rename to CanStartDragging
2) end of func: replace to Result:= not PtInRect(..);
--
Regards,
Alexey
More information about the Lazarus
mailing list