View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0018538 | Lazarus | Other | public | 2011-01-16 22:10 | 2016-01-02 10:29 |
Reporter | Andrey Zubarev | Assigned To | Juha Manninen | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 0.9.31 (SVN) | ||||
Target Version | 1.6 | Fixed in Version | 1.7 (SVN) | ||
Summary | 0018538: Under certain configurations docked windows, lower window arbitrarily increasing its height | ||||
Description | When using the package anchordocking (in IDE or my programs), after loading the default layout. | ||||
Steps To Reproduce | Save the default configuration windows in IDE like the animated gif and restart. Some actions lead to an increase height of the window "messages", such as compiling | ||||
Tags | docking | ||||
Fixed in Revision | r51097, r51098, r51099 | ||||
LazTarget | 1.6 | ||||
Widgetset | |||||
Attached Files |
|
related to | 0017908 | closed | Juha Manninen | WindowSate not saved for object inspector / messages |
related to | 0018977 | closed | Juha Manninen | The form position in Delphi2006 style Lazarus IDE is not right. |
related to | 0018298 | resolved | Mattias Gaertner | Please update the default layout provided with anchor docking package |
related to | 0026895 | closed | Juha Manninen | AnchorDocking: Messages window either disappears or becomes very small in some situations |
related to | 0029298 | closed | Ondrej Pokorny | Docked window height changes when changing the dock site width |
2011-01-16 22:10
|
|
2011-01-21 21:45
|
anchordocking.patch (793 bytes)
Index: anchordocking.pas =================================================================== --- anchordocking.pas (revision 29154) +++ anchordocking.pas (working copy) @@ -5066,8 +5066,8 @@ ChildSite.BoundSplitter.Top:=SplitterPos; case ChildSite.Align of alTop: ChildSite.Height:=ChildSite.BoundSplitter.Top; - alBottom: ChildSite.Height:=Site.ClientHeight - -(ChildSite.BoundSplitter.Top+ChildSite.BoundSplitter.Height); + //alBottom: ChildSite.Height:=Site.ClientHeight + // -(ChildSite.BoundSplitter.Top+ChildSite.BoundSplitter.Height); alLeft: ChildSite.Width:=ChildSite.BoundSplitter.Left; alRight: ChildSite.Width:=Site.ClientWidth -(ChildSite.BoundSplitter.Left+ChildSite.BoundSplitter.Width); |
|
This patch resolves the problem, perhaps wrongly. |
|
Target 0.99 for review of patch. |
|
Actually, compiling didn't cause the problem here, but creating a new form did. |
|
Yes, I am compiling led to rapidly reproduce the bug. The problem of lead any action causing DoAllAutoSize - creating, resize forms |
|
Mattias, just to confirm, there's no intention that the docking alignment works differently from the normal aligment, right? I ask this because fequently the controls acts as if the control are resized proportionally instead of respecting the normal splliter anchors. |
|
The default is when enlarging the window to enlarge all docked windows proportionally. You can disable this (right click on a dock header), but the options are not yet saved. |
|
OMG, I never read that reply. Mattias, don't you think this default should be changed? It's useful to have the option of resizing proportionally, but I don't know any docking implemention that behave like that - not by default at least. |
|
BTW, in a docked IDE, on Windows, unchecking the "Scale on Resize" option and trying to resize a docked control (or resize whole IDE/dockmaster) immediately raises an exception: 0 0xbaadf00d in ?? () 1 0x0040be72 in SYSTEM_TOBJECT_$__FREE () 2 0x0041fbdf in SYSUTILS_FREEANDNIL$formal () 3 0x00ccc566 in TANCHORDOCKMASTER__DESTROY (vmt=0x1,this=<error reading variable>) at anchordocking.pas:1885 4 0x0040be72 in SYSTEM_TOBJECT_$__FREE () 5 0x0041fbdf in SYSUTILS_FREEANDNIL$formal () 6 0x00cdc32d in ANCHORDOCKING_finalize () at anchordocking.pas:5636 7 0x0040e3c8 in SYSTEM_FINALIZEUNITS () 8 0x0ed410b4 in ?? () 9 0x004044cc in fpc_check_object () 10 0x00cd7f16 in TANCHORDOCKCLOSEBUTTON__CALCULATEPREFERREDSIZE (PREFERREDWIDTH=14, PREFERREDHEIGHT=14, WITHTHEMESPACE=true,this=<error reading variable>) at anchordocking.pas:4810 11 0x005d7889 in TCONTROL__GETPREFERREDSIZE (PREFERREDWIDTH=162851284,PREFERREDHEIGHT=187635824, RAW=true, WITHTHEMESPACE=true,this=<error reading variable>) at ./include/control.inc:5110 12 0x005b510b in INITPREFERREDSIZES (parentfp=0x9b4ea10) at ./include/wincontrol.inc:1031 13 0x005b4b7f in TAUTOSIZECTRLDATA__COMPUTEPREFERREDCLIENTAREA (MOVENONALIGNEDCHILDRENLEFT=false, MOVENONALIGNEDCHILDRENTOP=false,MOVENONALIGNEDTOLEFT=0, MOVENONALIGNEDTOTOP=0, PREFERREDCLIENTWIDTH=0,PREFERREDCLIENTHEIGHT=0, this=<error reading variable>) at ./include/wincontrol.inc:1121 14 0x005c702f in TWINCONTROL__CALCULATEPREFERREDSIZE (PREFERREDWIDTH=0, PREFERREDHEIGHT=0, WITHTHEMESPACE=true, this=<error reading variable>) at ./include/wincontrol.inc:7941 15 0x00cd71b6 in TANCHORDOCKHEADER__CALCULATEPREFERREDSIZE (PREFERREDWIDTH=0, PREFERREDHEIGHT=0, WITHTHEMESPACE=true,this=<error reading variable>) at anchordocking.pas:4658 16 0x005d7889 in TCONTROL__GETPREFERREDSIZE (PREFERREDWIDTH=2005097720,PREFERREDHEIGHT=17896532, RAW=false, WITHTHEMESPACE=true,this=<error reading variable>) at ./include/control.inc:5110 17 0x005b93d9 in DOPOSITION (CONTROL=0xd686550, AALIGN=ALLEFT,ACONTROLINDEX=0, parentfp=0x9b4ee28) at ./include/wincontrol.inc:2683 18 0x005b91de in DOALIGN (AALIGN=ALLEFT, parentfp=0x9b4ee28) at ./include/wincontrol.inc:3104 19 0x005b8c90 in TWINCONTROL__ALIGNCONTROLS (ACONTROL=0x0,REMAININGCLIENTRECT=..., this=<error reading variable>) at ./include/wincontrol.inc:3180 20 0x004268ed in TSCROLLINGWINCONTROL__ALIGNCONTROLS (ACONTROL=0x0, ARECT=..., this=<error reading variable>) at ./include/scrollingwincontrol.inc:86 21 0x00cd34a6 in TANCHORDOCKHOSTSITE__ALIGNCONTROLS (ACONTROL=0x0,ARECT=..., this=<error reading variable>) at anchordocking.pas:3690 22 0x005c1934 in TWINCONTROL__ALIGNCONTROL (ACONTROL=0x0,this=<error reading variable>) at ./include/wincontrol.inc:6243 23 0x005cf8ed in AUTOSIZECONTROL (ACONTROL=0xd6860c0, parentfp=0x9b4ef7c) at ./include/control.inc:2783 24 0x005cf92d in AUTOSIZECONTROL (ACONTROL=0xc73cb98, parentfp=0x9b4ef7c) at ./include/control.inc:2785 25 0x005cf5d2 in TCONTROL__DOALLAUTOSIZE (this=<error reading variable>) at ./include/control.inc:2828 26 0x005bab28 in TWINCONTROL__DOALLAUTOSIZE (this=<error reading variable>) at ./include/wincontrol.inc:3492 27 0x005d80c9 in TCONTROL__ENABLEAUTOSIZING (this=<error reading variable>) at ./include/control.inc:5340 28 0x005d51cc in TCONTROL__DOCK (NEWDOCKSITE=0x0, ARECT=...,this=<error reading variable>) at ./include/control.inc:4344 29 0x0042fe51 in TCUSTOMFORM__DOCK (NEWDOCKSITE=0x0, ARECT=...,this=<error reading variable>) at ./include/customform.inc:2887 30 0x005d42e8 in TCONTROL__SETHOSTDOCKSITE (AVALUE=0x0,this=<error reading variable>) at ./include/control.inc:3969 31 0x005c1ebe in TWINCONTROL__DESTROY (vmt=0x0,this=<error reading variable>) at ./include/wincontrol.inc:6415 32 0x005d8dec in TCUSTOMCONTROL__DESTROY (vmt=0x0,this=<error reading variable>) at ./include/customcontrol.inc:60 33 0x00427309 in TSCROLLINGWINCONTROL__DESTROY (vmt=0x0,this=<error reading variable>) at ./include/scrollingwincontrol.inc:262 34 0x00428285 in TCUSTOMFORM__DESTROY (vmt=0x1,this=<error reading variable>) at ./include/customform.inc:128 35 0x0040be72 in SYSTEM_TOBJECT_$__FREE () 36 0x004363e3 in TAPPLICATION__DOBEFOREFINALIZATION (this=<error reading variable>) at ./include/application.inc:1102 37 0x0042441d in BEFOREFINALIZATION () at forms.pp:1790 38 0x0040e529 in SYSTEM_INTERNALEXIT () 39 0x00000000 in ?? () I'll try debugging it... |
2012-03-18 22:25
|
FixScaleOnResize.patch (1,087 bytes)
Index: anchordocking.pas =================================================================== --- anchordocking.pas (revision 36148) +++ anchordocking.pas (working copy) @@ -1730,6 +1730,7 @@ FHeaderButtonSize:=Max(1,AValue); FreeCloseButtonBitmap; AutoSizeAllHeaders(true); + CreateCloseButtonBitmap; end; procedure TAnchorDockMaster.SetShowHeader(AValue: boolean); @@ -1784,7 +1785,7 @@ procedure TAnchorDockMaster.FreeCloseButtonBitmap; begin - fCloseBtnBitmap.Free; + freeandnil(fCloseBtnBitmap); end; Index: anchordockoptionsdlg.pas =================================================================== --- anchordockoptionsdlg.pas (revision 36148) +++ anchordockoptionsdlg.pas (working copy) @@ -239,6 +239,7 @@ TheSettings.ShowHeader:=ShowHeaderCheckBox.Checked; TheSettings.ShowHeaderCaption:=ShowHeaderCaptionCheckBox.Checked; TheSettings.HideHeaderCaptionFloatingControl:=HideHeaderCaptionForFloatingCheckBox.Checked; + TheSettings.HeaderButtonSize:=Master.HeaderButtonSize; end; procedure TAnchorDockOptionsFrame.LoadFromSettings( |
|
>>BTW, in a docked IDE, on Windows, unchecking the "Scale on Resize" option and >>trying to resize a docked control (or resize whole IDE/dockmaster) immediately >>raises an exception: FixScaleOnResize.patch resolves the problem, perhaps wrongly. |
|
The button code was rewritten. |
|
But the bug is still present (( |
|
The crash should be fixed. Is it not? |
|
I mean >>Under certain configurations docked windows, lower window arbitrarily increasing its height I attached an animated gif file since the start of Lazarus. message window is still changing its height, more than was specified in layout file |
|
|
|
Under what configurations does it change? I cannot reproduce it on neither Windows nor Linux. |
|
Lazarus 1.3 46459 FPC 2.7.1 i386-win32-win32/win64 Compose window as shown in http://bugs.freepascal.org/file_download.php?file_id=20803&type=bug At launch Lazarus moment message window is still changing its height |
|
It works under Windows XP, maybe it is Window 7 themes. |
|
>>maybe it is Window 7 themes. I don't think. I see the same incorrect behavior in Linux&Qt. How can I help in finding the problem? |
|
In Linux>K2 incorrect behavior too(( Layout file, screenshots before saving layout and after restarting IDE attached |
|
anchordocklayout.xml (1,766 bytes)
<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <MainConfig> <Nodes ChildCount="2"> <Item1 Name="MainIDE" Type="CustomSite" ChildCount="1"> <Bounds Left="63" Top="31" Width="667" Height="455"> <WorkArea> <Rect Right="2560" Bottom="1440"/> </WorkArea> </Bounds> <Item1 Name="AnchorDockSite5" Type="Layout" ChildCount="5"> <Bounds Top="60" Width="667" Height="365" SplitterPos="56"/> <Anchors Align="Bottom"/> <Item1 Name="MessagesView" Type="Control"> <Bounds Top="195" Width="422" Height="170"/> <Anchors Top="AnchorDockSplitter3" Right="AnchorDockSplitter2"/> </Item1> <Item2 Name="AnchorDockSplitter2" Type="SplitterVertical"> <Bounds Left="422" Width="4" Height="365"/> </Item2> <Item3 Name="CodeExplorerView" Type="Control"> <Bounds Left="426" Width="241" Height="365"/> <Anchors Left="AnchorDockSplitter2"/> </Item3> <Item4 Name="AnchorDockSplitter3" Type="SplitterHorizontal"> <Bounds Top="191" Width="422" Height="4"/> <Anchors Right="AnchorDockSplitter2"/> </Item4> <Item5 Name="SourceNotebook" Type="Control"> <Bounds Width="422" Height="191"/> <Anchors Right="AnchorDockSplitter2" Bottom="AnchorDockSplitter3"/> <Header Position="left"/> </Item5> </Item1> </Item1> <Item2 Name="ObjectInspectorDlg" Type="Control"> <Bounds Top="266" Width="306" Height="393"> <WorkArea> <Rect Right="2560" Bottom="1440"/> </WorkArea> </Bounds> </Item2> </Nodes> </MainConfig> </CONFIG> |
|
|
|
|
|
This was maybe fixed in r51081. Please test. Why does reading the active desktop in TMainIDE.StartIDE prevent the bug also with actions done while the IDE is running? It must be figured out and maybe solved in a better way. |
|
This is not a IDE bug, this is a AnchorDocking package problem. Unfortunately I have not opportunity to check in gtk and qt, but in win I have not noticed this problem |
|
> This is not a IDE bug, this is a AnchorDocking package problem. This is very much an IDE bug! Even your video and screenshots are about Lazarus IDE. Do you mean you can also reproduce the problem with a smaller test application which uses AnchorDocking package? > Unfortunately I have not opportunity to check in gtk and qt, but in win I have not noticed this problem Do you mean after r51081? |
|
About the bug: The bug persists when these circumstances are met: a.) The dock site has a main menu. (E.g. Lazarus IDE main bar). b.) TAnchorDockSettings.ScaleOnResize is enabled (True). Why does it happen? I will now talk about Lazarus IDE (the same applies to other forms as well): 1.) When the docked layout is read, MainIDEBar hasn't HandleAllocated and thus when setting BoundsRect an incorrect "ClientRect" (FClientWidth, FClientHeight) is saved in MainIDEBar. 2.) After the docked layout has been read, MainIDEBar is shown, it allocates handle and the real FClientHeight is received from OS/WS. The new FClientHeight is different (smaller) than the FClientHeight from point 1. 3.) Whenever DoAllAutoSize was called on MainIDEBar it did resize the dock site according to the difference in FClientHeight between 1 and 2 (because ScaleOnResize is True). Why does the workaround from r51081 work? Because (3) happens of course only once. When the docked layout is read again after MainIDEBar's handle has been allocated, FClientHeight is already correct. What is the real bug fix? To reset splitter parent ClientRect after MainIDEBar's ClientHeight is correct and ClientHeight takes MainMenu into account. That means after EnableAllAutoSizing. I fixed it in r51097. Juha please revert your changes (but keep DoShowMessagesView deleted). Then you can resolve this issue. + There is still a similar issue unsolved: 0029298. It looks same but is different and persists before and after r51097. |
|
Fixed together with related issues. |
|
Thanks! |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-01-16 22:10 | Andrey Zubarev | New Issue | |
2011-01-16 22:10 | Andrey Zubarev | File Added: anchordocking.gif | |
2011-01-16 22:12 | Andrey Zubarev | Tag Attached: docking | |
2011-01-21 21:45 | Andrey Zubarev | File Added: anchordocking.patch | |
2011-01-21 21:45 | Andrey Zubarev | Note Added: 0045388 | |
2011-02-08 14:36 | Vincent Snijders | LazTarget | => 0.99.0 |
2011-02-08 14:36 | Vincent Snijders | Note Added: 0045897 | |
2011-02-08 14:36 | Vincent Snijders | Status | new => acknowledged |
2011-02-08 14:36 | Vincent Snijders | Target Version | => 0.99.0 |
2011-03-24 11:20 | Juha Manninen | Relationship added | related to 0018977 |
2011-03-30 09:44 | Mattias Gaertner | Status | acknowledged => assigned |
2011-03-30 09:44 | Mattias Gaertner | Assigned To | => Mattias Gaertner |
2011-04-10 21:11 | Flávio Etrusco | Note Added: 0047411 | |
2011-04-10 22:19 | Andrey Zubarev | Note Added: 0047412 | |
2011-05-24 21:11 | Flávio Etrusco | Note Added: 0048550 | |
2011-05-24 21:19 | Mattias Gaertner | Note Added: 0048551 | |
2011-10-03 17:18 | Felipe Monteiro de Carvalho | LazTarget | 0.99.0 => 1.2 |
2012-03-06 07:14 | Paul Ishenin | Target Version | 0.99.0 => 1.2.0 |
2012-03-07 02:36 | Flávio Etrusco | Note Added: 0057336 | |
2012-03-07 03:42 | Flávio Etrusco | Note Added: 0057341 | |
2012-03-18 22:25 | Andrey Zubarev | File Added: FixScaleOnResize.patch | |
2012-03-18 22:27 | Andrey Zubarev | Note Added: 0057821 | |
2013-06-23 16:21 | Mattias Gaertner | Relationship added | related to 0018298 |
2014-02-15 20:51 | Martin Friebe | LazTarget | 1.2 => 1.4 |
2014-02-15 20:52 | Martin Friebe | Target Version | 1.2.0 => 1.4 |
2014-10-06 22:20 | Mattias Gaertner | Note Added: 0078025 | |
2014-10-06 22:20 | Mattias Gaertner | Status | assigned => resolved |
2014-10-06 22:20 | Mattias Gaertner | Resolution | open => fixed |
2014-10-06 22:40 | Andrey Zubarev | Note Added: 0078026 | |
2014-10-06 23:15 | Mattias Gaertner | Status | resolved => assigned |
2014-10-06 23:15 | Mattias Gaertner | Resolution | fixed => reopened |
2014-10-06 23:16 | Mattias Gaertner | Note Added: 0078027 | |
2014-10-07 00:05 | Andrey Zubarev | Note Added: 0078029 | |
2014-10-07 00:07 | Andrey Zubarev | File Added: stillpresent.gif | |
2014-10-07 02:11 | Mattias Gaertner | Note Added: 0078035 | |
2014-10-07 07:39 | Andrey Zubarev | Note Added: 0078038 | |
2014-10-08 01:06 | Mattias Gaertner | Note Added: 0078061 | |
2014-10-08 06:07 | Andrey Zubarev | Note Added: 0078063 | |
2014-10-08 06:44 | Andrey Zubarev | Note Added: 0078064 | |
2014-10-08 06:44 | Andrey Zubarev | File Added: anchordocklayout.xml | |
2014-10-08 06:45 | Andrey Zubarev | File Added: before_saving.png | |
2014-10-08 06:45 | Andrey Zubarev | File Added: after_restoring.png | |
2014-10-19 13:15 | Juha Manninen | Relationship added | related to 0026895 |
2015-04-27 21:59 | Juha Manninen | LazTarget | 1.4 => - |
2015-04-27 22:02 | Juha Manninen | Target Version | 1.4 => |
2015-12-29 17:30 | Juha Manninen | Assigned To | Mattias Gaertner => Juha Manninen |
2015-12-29 17:30 | Juha Manninen | Relationship added | related to 0017908 |
2015-12-29 18:15 | Juha Manninen | Note Added: 0088410 | |
2015-12-29 18:15 | Juha Manninen | Status | assigned => feedback |
2015-12-29 18:15 | Juha Manninen | Note Edited: 0088410 | View Revisions |
2015-12-29 20:32 | Andrey Zubarev | Note Added: 0088416 | |
2015-12-29 20:32 | Andrey Zubarev | Status | feedback => assigned |
2015-12-29 23:04 | Juha Manninen | Note Added: 0088418 | |
2015-12-31 14:29 | Ondrej Pokorny | Fixed in Revision | => 51097 |
2015-12-31 14:29 | Ondrej Pokorny | LazTarget | - => 1.6 |
2015-12-31 14:29 | Ondrej Pokorny | Fixed in Version | => 1.7 (SVN) |
2015-12-31 14:29 | Ondrej Pokorny | Target Version | => 1.6 |
2015-12-31 14:37 | Ondrej Pokorny | Note Added: 0088464 | |
2015-12-31 15:28 | Ondrej Pokorny | Relationship added | related to 0029298 |
2016-01-01 10:41 | Juha Manninen | Fixed in Revision | 51097 => r51097, r51098, r51099 |
2016-01-01 10:41 | Juha Manninen | Note Added: 0088488 | |
2016-01-01 10:41 | Juha Manninen | Status | assigned => resolved |
2016-01-01 10:41 | Juha Manninen | Resolution | reopened => fixed |
2016-01-02 10:29 | Andrey Zubarev | Note Added: 0088519 | |
2016-01-02 10:29 | Andrey Zubarev | Status | resolved => closed |