mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 12:19:20 +02:00
Qt: small optimisation when calculating mdiform area geometry.
git-svn-id: trunk@52149 -
This commit is contained in:
parent
d937152b73
commit
34f3fbbdfc
@ -8057,14 +8057,13 @@ begin
|
|||||||
{first must get contents rect - all except main menu}
|
{first must get contents rect - all except main menu}
|
||||||
QWidget_contentsRect(FCentralWidget, @R);
|
QWidget_contentsRect(FCentralWidget, @R);
|
||||||
{TODO: find better way to find out which controls are top,left,right & bottom aligned ...}
|
{TODO: find better way to find out which controls are top,left,right & bottom aligned ...}
|
||||||
for i := 0 to LCLObject.ComponentCount - 1 do
|
for i := 0 to LCLObject.ControlCount - 1 do
|
||||||
begin
|
begin
|
||||||
if (LCLObject.Components[i] is TWinControl) and
|
if (LCLObject.Controls[i] is TWinControl) and
|
||||||
(TWinControl(LCLObject.Components[i]).Parent = LCLObject) and
|
(TWinControl(LCLObject.Controls[i]).Align in [alTop, alLeft, alRight, alBottom]) then
|
||||||
(TWinControl(LCLObject.Components[i]).Align in [alTop, alLeft, alRight, alBottom]) then
|
|
||||||
begin
|
begin
|
||||||
R2 := TWinControl(LCLObject.Components[i]).BoundsRect;
|
R2 := TWinControl(LCLObject.Controls[i]).BoundsRect;
|
||||||
case TWinControl(LCLObject.Components[i]).Align of
|
case TWinControl(LCLObject.Controls[i]).Align of
|
||||||
alLeft: R.Left := R.Left + (R2.Right - R2.Left);
|
alLeft: R.Left := R.Left + (R2.Right - R2.Left);
|
||||||
alTop: R.Top := R.Top + (R2.Bottom - R2.Top);
|
alTop: R.Top := R.Top + (R2.Bottom - R2.Top);
|
||||||
alRight: R.Right := R.Right - (R2.Right - R2.Left);
|
alRight: R.Right := R.Right - (R2.Right - R2.Left);
|
||||||
|
Loading…
Reference in New Issue
Block a user