mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 07:38:14 +02:00
Gtk3: fixed mouse offset inside TGtk3GroupBox.
This commit is contained in:
parent
4b3cb64bd6
commit
b306e3be43
@ -733,6 +733,7 @@ type
|
||||
function getText: String; override;
|
||||
procedure setText(const AValue: String); override;
|
||||
public
|
||||
function getClientOffset:TPoint; override;
|
||||
function getClientRect:TRect; override;
|
||||
property GroupBoxType: TGtk3GroupBoxType read FGroupBoxType write FGroupBoxType;
|
||||
end;
|
||||
@ -3538,6 +3539,18 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TGtk3GroupBox.getClientOffset: TPoint;
|
||||
var
|
||||
Allocation: TGtkAllocation;
|
||||
R: TRect;
|
||||
begin
|
||||
Self.Widget^.get_allocation(@Allocation);
|
||||
Result.X := -Allocation.X;
|
||||
Result.Y := -Allocation.Y;
|
||||
R := getClientBounds;
|
||||
Result := Point(Result.x + R.Left, Result.y + R.Top);
|
||||
end;
|
||||
|
||||
{$IF DEFINED(GTK3DEBUGSIZE) OR DEFINED(GTK3DEBUGGROUPBOX)}
|
||||
procedure ContainerChildrenCallback(widget: PGtkWidget; data: gpointer); cdecl;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user