mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 10:19:12 +02:00
cocoa: update tab page view resizing for negative sizes
git-svn-id: trunk@58974 -
This commit is contained in:
parent
7df6b50920
commit
b6dd78878f
@ -108,6 +108,7 @@ type
|
|||||||
public
|
public
|
||||||
tabView: TCocoaTabControl;
|
tabView: TCocoaTabControl;
|
||||||
tabPage: TCocoaTabPage;
|
tabPage: TCocoaTabPage;
|
||||||
|
procedure setFrame(arect: NSRect); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function IndexOfTab(ahost: TCocoaTabControl; atab: NSTabViewItem): Integer;
|
function IndexOfTab(ahost: TCocoaTabControl; atab: NSTabViewItem): Integer;
|
||||||
@ -303,6 +304,20 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TCocoaTabPageView }
|
||||||
|
|
||||||
|
procedure TCocoaTabPageView.setFrame(arect: NSRect);
|
||||||
|
begin
|
||||||
|
// It's possible for a tab page view to go in negative height.
|
||||||
|
// However, automatic resizing flags (for whatever reason) prevent
|
||||||
|
// TCocoaTabPageView to go into negative height (remaining at 0 pixels)
|
||||||
|
// The code below makes sure that resizing is actually happening
|
||||||
|
if Assigned(superView) and (superView.frame.size.height < arect.size.height) then
|
||||||
|
arect.size.height := superView.frame.size.height;
|
||||||
|
|
||||||
|
inherited setFrame(arect);
|
||||||
|
end;
|
||||||
|
|
||||||
{ TCocoaTabPage }
|
{ TCocoaTabPage }
|
||||||
|
|
||||||
function TCocoaTabPage.lclGetCallback: ICommonCallback;
|
function TCocoaTabPage.lclGetCallback: ICommonCallback;
|
||||||
|
Loading…
Reference in New Issue
Block a user