mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 09:32:59 +02:00
gtk2 intf: fixed TGtk2WSCustomTabControl.GetDefaultClientRect to check if gtknotebook has a page
git-svn-id: trunk@36905 -
This commit is contained in:
parent
e99a152f77
commit
38c771eeb4
@ -311,8 +311,11 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
//DebugLn(['TGtk2WSCustomTabControl.GetDefaultClientRect ',DbgSName(AWinControl),' ',aWidth,'x',aHeight]);
|
||||
if AWinControl.HandleAllocated then begin
|
||||
|
||||
if AWinControl.HandleAllocated
|
||||
and (gtk_notebook_get_nth_page({%H-}PGtkNotebook(AWinControl.Handle),0)<>nil) then
|
||||
begin
|
||||
// handle allocated and has one page
|
||||
// => normal GetClientRect will retrieve the right ClientRect
|
||||
end else begin
|
||||
FrameBorders:=GetStyleNotebookFrameBorders;
|
||||
aClientRect:=Rect(0,0,
|
||||
|
@ -4381,7 +4381,7 @@ var
|
||||
ARect:=Rect(0,0,
|
||||
Max(0,AWidth-FrameBorders.Left-FrameBorders.Right),
|
||||
Max(0,aHeight-FrameBorders.Top-FrameBorders.Bottom));
|
||||
//DebugLn(['GetNoteBookClientRect using defaults: ',GetWidgetDebugReport(Widget),' ARect=',dbgs(aRect)]);
|
||||
//DebugLn(['GetNoteBookClientRect using defaults: ',GetWidgetDebugReport(Widget),' ARect=',dbgs(aRect),' Frame=',dbgs(FrameBorders)]);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user