Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-07

Comment about new LCL diff

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alexey
+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

Reply by email