mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 18:59:32 +02:00
gtk2: clean up
git-svn-id: trunk@37076 -
This commit is contained in:
parent
e7681a3637
commit
eb63525d62
@ -6269,20 +6269,12 @@ begin
|
|||||||
gtk_widget_size_request(Widget,@Requisition);
|
gtk_widget_size_request(Widget,@Requisition);
|
||||||
PreferredWidth:=Requisition.width;
|
PreferredWidth:=Requisition.width;
|
||||||
PreferredHeight:=Requisition.height;
|
PreferredHeight:=Requisition.height;
|
||||||
if WithThemeSpace then begin
|
|
||||||
|
|
||||||
end else begin
|
|
||||||
//debugLn('GetGTKDefaultWidgetSize ',DbgSName(AWinControl),' ',dbgs(gtk_widget_get_xthickness(Widget)),' ythickness=',dbgs(gtk_widget_get_ythickness(Widget)));
|
|
||||||
//debugLn(['GetGTKDefaultWidgetSize ',GetWidgetDebugReport(Widget)]);
|
|
||||||
//dec(PreferredWidth,gtk_widget_get_xthickness(Widget));
|
|
||||||
//if gtk_class_get_type(gtk_object_get_class(Widget))=GTK_TYPE_BUTTON then
|
|
||||||
// dec(PreferredHeight,2*gtk_widget_get_ythickness(Widget));
|
|
||||||
end;
|
|
||||||
{DebugLn(['GetGTKDefaultWidgetSize Allocation=',Widget^.allocation.x,',',Widget^.allocation.y,',',Widget^.allocation.width,',',Widget^.allocation.height,
|
{DebugLn(['GetGTKDefaultWidgetSize Allocation=',Widget^.allocation.x,',',Widget^.allocation.y,',',Widget^.allocation.width,',',Widget^.allocation.height,
|
||||||
' requisition=',Widget^.requisition.width,',',Widget^.requisition.height,
|
' requisition=',Widget^.requisition.width,',',Widget^.requisition.height,
|
||||||
' PreferredWidth=',PreferredWidth,' PreferredHeight=',PreferredHeight,
|
' PreferredWidth=',PreferredWidth,' PreferredHeight=',PreferredHeight,
|
||||||
' WithThemeSpace=',WithThemeSpace]);}
|
' WithThemeSpace=',WithThemeSpace]);}
|
||||||
// set new size
|
|
||||||
|
// restore size
|
||||||
gtk_widget_set_size_request(Widget, AWinControl.Width, AWinControl.Height);
|
gtk_widget_set_size_request(Widget, AWinControl.Width, AWinControl.Height);
|
||||||
//debugln('GetGTKDefaultSize PreferredWidth=',dbgs(PreferredWidth),' PreferredHeight=',dbgs(PreferredHeight));
|
//debugln('GetGTKDefaultSize PreferredWidth=',dbgs(PreferredWidth),' PreferredHeight=',dbgs(PreferredHeight));
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user