View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0027638 | Lazarus | IDE | public | 2015-03-10 06:52 | 2017-05-21 19:40 |
Reporter | Serge Anvarov | Assigned To | Juha Manninen | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | x32-x64 | OS | Windows | ||
Product Version | 1.4RC2 | ||||
Target Version | 1.6.4 | Fixed in Version | 1.7 (SVN) | ||
Summary | 0027638: Top position of Form Designer depend of top position of Object Inspector | ||||
Description | When we change position and size of designer windows all saved when closed IDE, except Form. It's always same default size and it's top position some pixels (32?) below top position of Object Inspector. IDE 64-bit and IDE 32-bit have same behavior. | ||||
Steps To Reproduce | Start IDE. Move Object Inspector to top (and shrink main top window). Next time Form will be under Main top window. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | r52829 | ||||
LazTarget | - | ||||
Widgetset | Win32/Win64 | ||||
Attached Files |
|
|
This makes no sense. Please test again with a clean Lazarus 1.6 installation. You probably had a corrupt configuration. |
|
No feedback. Resolving. |
|
Lazarus 1.6. Clean install. The same error. Start first time (screen 1). Shrink (move) top(main) panel to the right. Up Object Inspector to the top. Close. Open - error (screen2) |
|
|
|
|
|
Can you try 1.6 fixes branch? |
|
Bart, I don't think 1.6 fixes has any changes that would affect this. I am also pretty sure there is no code in Lazarus that adjusts the location of designer form based on Object Inspector. Could it be a corrupt configuration? Can you please test with a clean configuration by either deleting/renaming the exiting one or by using --pcp= parameter. |
|
|
|
|
|
|
|
|
|
|
|
OK. Uninstall all. Install, select "Clear old..." 1. First start - F1.jpg. Form designer under main form, menu on russion (default system language, ignored install language select) 2. Second start (after change IDE language) - F2.jpg.Form designer already not intersect with main. After it some start/exit IDE not change forms layout. 3. Move main form to right - F3.jpg. Some start/exit IDE not change forms layout. 4. Move object inspector to top - F4.jpg. 5. After restart form designer position is wrong - F5.jpg |
|
Yes, the position of a NEW GUI application form is relative to the Object Inspector (Lazarus 1.2, 1.4, 1.6 and 1.7 trunk (without Sparta Docked Form Editor)). Simple move Object Inspector and click Project -> New Project -> Application. Now move again and click again. If you save your project, the forms should be at the designed positions. |
|
Yes, I can reproduce it with new applications. The Top position is set in TLazSourceFileManager.CreateNewForm. This is not a serious bug because most often the application and its forms are saved. New applications are created only sometimes. I will fix it somehow anyway. |
|
> New applications are created only sometimes. No, for test cases, I do it very often. I added a patch (tested Windows 7, Linux Mint GTK2). It fixes this issue and the new form isn't over the Object Inspector. Maybe you find a better solution. |
|
sourcefilemanager.pas.patch (1,448 bytes)
Index: ide/sourcefilemanager.pas =================================================================== --- ide/sourcefilemanager.pas (revision 52824) +++ ide/sourcefilemanager.pas (working copy) @@ -4433,7 +4433,7 @@ var NewComponent: TComponent; new_x, new_y: integer; - p: TPoint; + MainIDEBarBottom: integer; r: TRect; begin if not AncestorType.InheritsFrom(TComponent) then @@ -4455,11 +4455,9 @@ // Figure out where we want to put the new form // if there is more place left of the OI put it left, otherwise right - p:=Point(0,0); if ObjectInspector1<>nil then begin - p:=ObjectInspector1.ClientOrigin; - new_x:=p.x; - new_y:=p.Y+10; + new_x:=ObjectInspector1.Left+10; + new_y:=ObjectInspector1.Top+10; end else begin new_x:=200; new_y:=100; @@ -4467,7 +4465,13 @@ if new_x>Screen.Width div 2 then new_x:=new_x-500 else if ObjectInspector1<>nil then - new_x:=new_x+ObjectInspector1.Width; + new_x:=new_x+ObjectInspector1.Width+GetSystemMetrics(SM_CXFRAME) shl 1; + if Assigned(MainIDEBar) then + begin + MainIDEBarBottom:=MainIDEBar.Top+MainIDEBar.Height+GetSystemMetrics(SM_CYFRAME) shl 1+GetSystemMetrics(SM_CYCAPTION); + if MainIDEBarBottom<Screen.Height div 2 then + new_y:=Max(new_y,MainIDEBarBottom+10); + end; r:=Screen.PrimaryMonitor.WorkareaRect; new_x:=Max(r.Left,Min(new_x,r.Right-400)); new_y:=Max(r.Top,Min(new_y,r.Bottom-400)); |
|
Michl, your solution is quite perfect. Applied, thanks. |
|
Lazarus 1.6.2 revision 53354. Bug still here. |
|
Should this be merged to fixes 1.6? |
|
> Should this be merged to fixes 1.6? IMO it won't do any harm. So yes, I added it to merge list. |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-03-10 06:52 | Serge Anvarov | New Issue | |
2016-03-12 13:38 | Juha Manninen | LazTarget | => - |
2016-03-12 13:38 | Juha Manninen | Note Added: 0090930 | |
2016-03-12 13:38 | Juha Manninen | Assigned To | => Juha Manninen |
2016-03-12 13:38 | Juha Manninen | Status | new => feedback |
2016-04-08 14:33 | Juha Manninen | Note Added: 0091852 | |
2016-04-08 14:33 | Juha Manninen | Status | feedback => resolved |
2016-04-08 14:33 | Juha Manninen | Resolution | open => unable to reproduce |
2016-08-10 16:52 | Serge Anvarov | Note Added: 0094079 | |
2016-08-10 16:52 | Serge Anvarov | Status | resolved => assigned |
2016-08-10 16:52 | Serge Anvarov | Resolution | unable to reproduce => reopened |
2016-08-10 16:53 | Serge Anvarov | File Added: p1.jpg | |
2016-08-10 16:53 | Serge Anvarov | File Added: p2.jpg | |
2016-08-10 18:03 | Bart Broersma | Note Added: 0094080 | |
2016-08-11 14:02 | Juha Manninen | Note Added: 0094096 | |
2016-08-11 14:03 | Juha Manninen | Note Edited: 0094096 | View Revisions |
2016-08-15 13:32 | Serge Anvarov | File Added: F1.jpg | |
2016-08-15 13:32 | Serge Anvarov | File Added: F2.jpg | |
2016-08-15 13:32 | Serge Anvarov | File Added: F3.jpg | |
2016-08-15 13:33 | Serge Anvarov | File Added: F4.jpg | |
2016-08-15 13:33 | Serge Anvarov | File Added: F5.jpg | |
2016-08-15 13:40 | Serge Anvarov | Note Added: 0094127 | |
2016-08-15 14:03 | Michl | Note Added: 0094128 | |
2016-08-15 14:05 | Michl | Note Edited: 0094128 | View Revisions |
2016-08-15 14:06 | Michl | Note Edited: 0094128 | View Revisions |
2016-08-15 14:12 | Michl | Note Edited: 0094128 | View Revisions |
2016-08-17 22:00 | Juha Manninen | Note Added: 0094164 | |
2016-08-17 23:10 | Juha Manninen | Note Edited: 0094164 | View Revisions |
2016-08-18 09:05 | Michl | Note Added: 0094169 | |
2016-08-18 09:06 | Michl | File Added: sourcefilemanager.pas.patch | |
2016-08-18 16:34 | Juha Manninen | Fixed in Revision | => r52829 |
2016-08-18 16:34 | Juha Manninen | Note Added: 0094173 | |
2016-08-18 16:34 | Juha Manninen | Status | assigned => resolved |
2016-08-18 16:34 | Juha Manninen | Resolution | reopened => fixed |
2016-11-26 19:37 | Serge Anvarov | Note Added: 0096268 | |
2016-11-26 19:37 | Serge Anvarov | Status | resolved => assigned |
2016-11-26 19:37 | Serge Anvarov | Resolution | fixed => reopened |
2016-11-26 22:12 | Bart Broersma | Note Added: 0096277 | |
2016-11-26 22:31 | Ondrej Pokorny | Note Added: 0096278 | |
2016-11-26 22:31 | Ondrej Pokorny | Status | assigned => resolved |
2016-11-26 22:31 | Ondrej Pokorny | Resolution | reopened => fixed |
2016-11-26 22:32 | Ondrej Pokorny | Fixed in Version | => 1.7 (SVN) |
2016-11-26 22:32 | Ondrej Pokorny | Target Version | => 1.6.4 |
2017-05-21 19:40 | Serge Anvarov | Status | resolved => closed |