mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 03:09:32 +02:00
Merged revision(s) 59865-59866 #e676482f09-#e676482f09 from trunk:
LCL: TWinControl: Fixed TGraphicControl.Cursor not working properly with TScrollBox. Issue #34714 ........ LCL: Missed removing of capfHasScrollOffset in LCL. Needed for revision 59865 #e676482f09. ........ git-svn-id: branches/fixes_2_0@59869 -
This commit is contained in:
parent
98a3881d47
commit
67008a7ffa
@ -3226,7 +3226,7 @@ begin
|
||||
begin // runtime - handle multi clicks according to ControlStyle
|
||||
if LastMouse.ClickCount > 1 then
|
||||
begin
|
||||
TargetControl := AWinControl.ControlAtPos(AWinControl.ScreenToClient(AMousePos), [capfHasScrollOffset]);
|
||||
TargetControl := AWinControl.ControlAtPos(AWinControl.ScreenToClient(AMousePos), []);
|
||||
if TargetControl=nil then
|
||||
TargetControl := AWinControl;
|
||||
case LastMouse.ClickCount of
|
||||
@ -3394,8 +3394,7 @@ begin
|
||||
begin
|
||||
Result := WinControl;
|
||||
Control := WinControl.ControlAtPos(WinControl.ScreenToClient(Position),
|
||||
[capfAllowWinControls, capfRecursive,
|
||||
capfHasScrollOffset] + DisabledFlag[AllowDisabled]);
|
||||
[capfAllowWinControls, capfRecursive] + DisabledFlag[AllowDisabled]);
|
||||
//debugln(['FindControlAtPosition ',dbgs(Position),' ',DbgSName(WinControl),' ',dbgs(WinControl.ScreenToClient(Position)),' ',DbgSName(Control)]);
|
||||
if Assigned(Control) then
|
||||
Result := Control;
|
||||
|
@ -182,7 +182,6 @@ type
|
||||
public
|
||||
constructor Create(TheOwner : TComponent); override;
|
||||
destructor Destroy; override;
|
||||
function ControlAtPos(const Pos: TPoint; Flags: TControlAtPosFlags): TControl; override;
|
||||
function ScreenToClient(const APoint: TPoint): TPoint; override;
|
||||
function ClientToScreen(const APoint: TPoint): TPoint; override;
|
||||
procedure UpdateScrollbars;
|
||||
|
@ -316,12 +316,6 @@ begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TScrollingWinControl.ControlAtPos(const Pos: TPoint;
|
||||
Flags: TControlAtPosFlags): TControl;
|
||||
begin
|
||||
Result := inherited ControlAtPos(Pos, Flags - [capfHasScrollOffset]);
|
||||
end;
|
||||
|
||||
function TScrollingWinControl.ScreenToClient(const APoint: TPoint): TPoint;
|
||||
var
|
||||
P: TPoint;
|
||||
|
@ -5151,21 +5151,15 @@ var
|
||||
function GetControlAtPos(AControl: TControl): Boolean;
|
||||
var
|
||||
ControlPos: TPoint;
|
||||
ControlClientBounds: TRect;
|
||||
begin
|
||||
with AControl do
|
||||
begin
|
||||
// MG: Delphi checks for PtInRect(ClientRect,P). But the client area is
|
||||
// not always at 0,0, so I guess this is a bug in the VCL.
|
||||
|
||||
ControlPos := Point(P.X - Left, P.Y - Top);
|
||||
Result := (ControlPos.X >= 0) and (ControlPos.Y >= 0) and
|
||||
(ControlPos.X < Width) and (ControlPos.Y < Height);
|
||||
|
||||
if Result and (capfOnlyClientAreas in Flags) then
|
||||
begin
|
||||
ControlClientBounds := GetChildrenRect(false);
|
||||
Result:=PtInRect(ControlClientBounds, ControlPos);
|
||||
end;
|
||||
Result := PtInRect(ClientRect, ControlPos);
|
||||
|
||||
Result := Result
|
||||
and (
|
||||
@ -8424,7 +8418,7 @@ begin
|
||||
begin
|
||||
// don't allow disabled and don't search wincontrols - they receive their
|
||||
// message themself
|
||||
Child := ControlAtPos(ScreenToClient(SmallPointToPoint(Message.Pos)), [capfHasScrollOffset]);
|
||||
Child := ControlAtPos(ScreenToClient(SmallPointToPoint(Message.Pos)), []);
|
||||
if Assigned(Child) then
|
||||
with Message do
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user