mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 22:19:21 +02:00
cocoa: Fixes bug #31914: TPageControl problems with Cocoa
git-svn-id: trunk@55333 -
This commit is contained in:
parent
b3a9a3d9ce
commit
9b0908abc4
@ -3038,6 +3038,11 @@ procedure TCocoaTabControl.tabView_didSelectTabViewItem(tabView: NSTabView;
|
|||||||
var
|
var
|
||||||
Msg: TLMNotify;
|
Msg: TLMNotify;
|
||||||
Hdr: TNmHdr;
|
Hdr: TNmHdr;
|
||||||
|
i: Integer;
|
||||||
|
lTabView, lCurSubview: NSView;
|
||||||
|
lLCLControl: TWinControl;
|
||||||
|
lBounds: TRect;
|
||||||
|
lCurCallback: ICommonCallback;
|
||||||
begin
|
begin
|
||||||
if LCLPageControl = nil then Exit;
|
if LCLPageControl = nil then Exit;
|
||||||
|
|
||||||
@ -3051,6 +3056,21 @@ begin
|
|||||||
Msg.NMHdr := @Hdr;
|
Msg.NMHdr := @Hdr;
|
||||||
Msg.Result := 0;
|
Msg.Result := 0;
|
||||||
LCLMessageGlue.DeliverMessage(LCLPageControl, Msg);
|
LCLMessageGlue.DeliverMessage(LCLPageControl, Msg);
|
||||||
|
|
||||||
|
// Update the coordinates of all children of this tab
|
||||||
|
// Fixes bug 31914: TPageControl problems with Cocoa
|
||||||
|
lTabView := tabViewItem.view.subViews.objectAtIndex(0);
|
||||||
|
for i := 0 to lTabView.subViews.count-1 do
|
||||||
|
begin
|
||||||
|
lCurSubview := lTabView.subViews.objectAtIndex(i);
|
||||||
|
lCurCallback := lCurSubview.lclGetCallback();
|
||||||
|
if Assigned(lCurCallback) then
|
||||||
|
begin
|
||||||
|
lLCLControl := TWinControl(lCurCallback.GetTarget());
|
||||||
|
lBounds := Classes.Bounds(lLCLControl.Left, lLCLControl.Top, lLCLControl.Width, lLCLControl.Height);
|
||||||
|
lCurSubview.lclSetFrame(lBounds);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCocoaTabControl.tabViewDidChangeNumberOfTabViewItems(
|
procedure TCocoaTabControl.tabViewDidChangeNumberOfTabViewItems(
|
||||||
|
Loading…
Reference in New Issue
Block a user