*Fixed MDI window sizes and child controls alignment.

git-svn-id: trunk@11604 -
This commit is contained in:
zeljko 2007-07-23 18:25:09 +00:00
parent 9e4a4f717f
commit d2c1b2ccab

View File

@ -35,7 +35,7 @@ uses
{$endif} {$endif}
qtwidgets, qtobjects, qtwidgets, qtobjects,
// LCL // LCL
SysUtils, Controls, LCLType, LCLProc, Forms, Graphics, SysUtils, Classes, Controls, LCLType, LCLProc, Forms, Graphics,
// Widgetset // Widgetset
InterfaceBase, WSControls, WSLCLClasses; InterfaceBase, WSControls, WSLCLClasses;
@ -163,6 +163,7 @@ end;
class procedure TQtWSCustomControl.ShowHide(const AWinControl: TWinControl); class procedure TQtWSCustomControl.ShowHide(const AWinControl: TWinControl);
var var
Widget: TQtWidget; Widget: TQtWidget;
R: TRect;
begin begin
{$ifdef VerboseQt} {$ifdef VerboseQt}
WriteLn('Trace:> [TQtWSCustomControl.ShowHide]'); WriteLn('Trace:> [TQtWSCustomControl.ShowHide]');
@ -186,8 +187,12 @@ begin
if TForm(AWinControl).FormStyle = fsMDIChild then if TForm(AWinControl).FormStyle = fsMDIChild then
begin begin
TForm(AWinControl).Left := 0; {MDI windows have to be resized , since titlebar is included into widget geometry !}
TForm(AWinControl).Top := 0; QWidget_contentsRect(Widget.Widget, @R);
TForm(AWinControl).Left := 0;
TForm(AWinControl).Top := 0;
TForm(AWinControl).Width := TForm(AWinControl).Width + R.Left;
TForm(AWinControl).Height := TForm(AWinControl).Height + R.Top;
TForm(AWinControl).ReAlign; TForm(AWinControl).ReAlign;
end; end;
end; end;