mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 10:59:29 +02:00
LCLnow uses GetPreferredSize without theme space
git-svn-id: trunk@9333 -
This commit is contained in:
parent
15b9273998
commit
cac7932f7c
@ -116,7 +116,10 @@ begin
|
||||
MaximumSize[asboHorizontal]:=Control.Constraints.EffectiveMaxWidth;
|
||||
MaximumSize[asboVertical]:=Control.Constraints.EffectiveMaxHeight;
|
||||
Control.GetPreferredSize(PreferredSize[asboHorizontal],
|
||||
PreferredSize[asboVertical]);
|
||||
PreferredSize[asboVertical],
|
||||
false, // with constraints
|
||||
false // without them space
|
||||
);
|
||||
Control.BorderSpacing.GetSpaceAround(Border);
|
||||
BorderLeftTop[asboHorizontal]:=Border.Left;
|
||||
BorderLeftTop[asboVertical]:=Border.Top;
|
||||
@ -1860,7 +1863,7 @@ begin
|
||||
|
||||
// autosize control to preferred size
|
||||
if (not WidthIsFixed) or (not HeightIsFixed) then begin
|
||||
GetPreferredSize(PreferredWidth,PreferredHeight);
|
||||
GetPreferredSize(PreferredWidth,PreferredHeight,false,false);
|
||||
//if ControlCount>0 then
|
||||
// DebugLn('TWinControl.DoAutoSize ',DbgSName(Self),' PreferredWidth=',dbgs(PreferredWidth),' PreferredHeight=',dbgs(PreferredHeight));
|
||||
end else begin
|
||||
@ -5714,7 +5717,7 @@ begin
|
||||
if a in FixatedAnchors then FixateSide(a);
|
||||
|
||||
if AControl.AutoSize then
|
||||
AControl.GetPreferredSize(ChildWidth,ChildHeight)
|
||||
AControl.GetPreferredSize(ChildWidth,ChildHeight,false,false)
|
||||
else begin
|
||||
ChildWidth:=AControl.Width;
|
||||
ChildHeight:=AControl.Height;
|
||||
|
@ -6195,7 +6195,9 @@ begin
|
||||
PreferredWidth:=Requisition.width;
|
||||
PreferredHeight:=Requisition.height;
|
||||
if not WithThemeSpace then begin
|
||||
// TODO
|
||||
//DebugLn('GetGTKDefaultWidgetSize ',DbgSName(AWinControl),' ',dbgs(gtk_widget_get_xthickness(Widget)),' ',dbgs(gtk_widget_get_ythickness(Widget)));
|
||||
dec(PreferredWidth,2*gtk_widget_get_xthickness(Widget));
|
||||
dec(PreferredHeight,2*gtk_widget_get_ythickness(Widget));
|
||||
end;
|
||||
// set new size
|
||||
gtk_widget_set_usize(Widget,AWinControl.Width,AWinControl.Height);
|
||||
|
Loading…
Reference in New Issue
Block a user