Gtk3: fixed mouse offset inside TGtk3GroupBox.

This commit is contained in:
zeljan1 2025-03-21 15:18:34 +01:00
parent 4b3cb64bd6
commit b306e3be43

View File

@ -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