[AnchorDocking, 1.6RC2] Splitter top position jumps
Original Reporter info from Mantis: BBaz @basile.b
-
Reporter name:
Original Reporter info from Mantis: BBaz @basile.b
- Reporter name:
Description:
After a layout is reloaded, the first time a main form is realigned, the height of all the docked forms is indirectly modified due to a problem caused by the splitters top position.
The problem happens since the splitter position is updated using a floating point value (FPercentPosition).
---
description of te problem by SVN revision:
- 51097 was still OK.
- 51099 introduced a problem, a huge height jump.
- 51184 fixed the huge jump, from here remains the slight modification, as described before.
---
workaround:
If I deactivate the splitter top position update via the FP value then the problem disapears, around line 6127 in AnchorDocking.pas:
procedure TAnchorDockSplitter.SetBoundsPercentually;
begin
[...]
//if (FPercentPosition > 0) or SameValue(FPercentPosition, 0) then
//NewTop := Round(FPercentPosition*Parent.ClientHeight)
//else
NewTop := (DockBounds.Top*Parent.ClientHeight) div DockParentClientSize.cy;
SetBoundsKeepDockBounds(NewLeft,NewTop,Width,Height);
[...]
---
related forum messages:
- http://forum.lazarus.freepascal.org/index.php/topic,31095.msg199349.html#msg199349
- http://forum.lazarus.freepascal.org/index.php/topic,31095.msg199416.html#msg199416
Mantis conversion info:
- Mantis ID: 29475
- Monitored by: » Dirk Fellenberg (Dirk Fellenberg)