mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 01:28:19 +02:00
gtk intf: fixed TGtkWidgetSet.GetControlConstraints
git-svn-id: trunk@12714 -
This commit is contained in:
parent
22b7128760
commit
59f3b4944b
@ -193,9 +193,12 @@ var
|
||||
BackupFileName: String;
|
||||
begin
|
||||
Result := mrOK;
|
||||
{ There are several cases:
|
||||
1. user has not yet created a custom IDE
|
||||
2. user has created a custom IDE (~/.lazarus/bin/)
|
||||
|
||||
|
||||
|
||||
}
|
||||
NewFileName := GetLazarusPath('lazarus.new');
|
||||
FLazarusPath := GetLazarusPath('lazarus');
|
||||
BackupFileName := GetLazarusPath('lazarus.old');
|
||||
|
@ -564,8 +564,8 @@ var
|
||||
begin
|
||||
Result:=true;
|
||||
if Constraints is TSizeConstraints then begin
|
||||
MinWidth := 1;
|
||||
MinHeight := 1;
|
||||
MinWidth:=1;
|
||||
MinHeight:=1;
|
||||
MaxWidth:=0;
|
||||
MaxHeight:=0;
|
||||
SizeConstraints:=TSizeConstraints(Constraints);
|
||||
@ -577,14 +577,13 @@ begin
|
||||
if TScrollBar(SizeConstraints.Control).Kind=sbHorizontal then begin
|
||||
Widget:=GetStyleWidget(lgsHorizontalScrollbar);
|
||||
MinHeight:=Widget^.requisition.Height;
|
||||
MaxHeight:=MinHeight;
|
||||
end else begin
|
||||
Widget:=GetStyleWidget(lgsVerticalScrollbar);
|
||||
MinWidth:=Widget^.requisition.Width;
|
||||
MaxWidth:=MinWidth;
|
||||
end;
|
||||
//DebugLn('TGtkWidgetSet.GetControlConstraints A '+dbgs(MinWidth)+','+dbgs(MinHeight),' ',dbgs(TScrollBar(SizeConstraints.Control).Kind=sbHorizontal),' ',TScrollBar(SizeConstraints.Control).Name);
|
||||
SizeConstraints.SetInterfaceConstraints(MinWidth,MinHeight,
|
||||
MinWidth,MinHeight);
|
||||
exit;
|
||||
end
|
||||
else if SizeConstraints.Control is TCustomSplitter then begin
|
||||
// TCustomSplitter
|
||||
@ -592,13 +591,12 @@ begin
|
||||
begin
|
||||
Widget:=GetStyleWidget(lgsHorizontalPaned);
|
||||
MinHeight:=Widget^.requisition.Height;
|
||||
MaxHeight:=MinHeight;
|
||||
end else begin
|
||||
Widget:=GetStyleWidget(lgsVerticalPaned);
|
||||
MinWidth:=Widget^.requisition.Width;
|
||||
MaxWidth:=MinWidth;
|
||||
end;
|
||||
SizeConstraints.SetInterfaceConstraints(MinWidth,MinHeight,
|
||||
MinWidth,MinHeight);
|
||||
exit;
|
||||
end
|
||||
else if SizeConstraints.Control is TCustomMemo then begin
|
||||
// TCustomMemo
|
||||
|
Loading…
Reference in New Issue
Block a user