mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 06:09:15 +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
|
||||
tabView: TCocoaTabControl;
|
||||
tabPage: TCocoaTabPage;
|
||||
procedure setFrame(arect: NSRect); override;
|
||||
end;
|
||||
|
||||
function IndexOfTab(ahost: TCocoaTabControl; atab: NSTabViewItem): Integer;
|
||||
@ -303,6 +304,20 @@ begin
|
||||
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 }
|
||||
|
||||
function TCocoaTabPage.lclGetCallback: ICommonCallback;
|
||||
|
Loading…
Reference in New Issue
Block a user