* * *

Author Topic: Alt-G does not work any more  (Read 7327 times)

dsyrios

  • New member
  • *
  • Posts: 41
Re: Alt-G does not work any more
« Reply #45 on: April 06, 2018, 05:28:00 pm »
@rvk
You are right...
Quote
If you want this working in Lazarus 1.8.2 just open up procedurelist.pas (with lazarus.lpi open), goto the form (F12) and toggle something and save it again. Rebuild the Lazarus ide again and it should work.
When I change any xxx% DPI, it crashes and I have to do the above solution again.

dsyrios

  • New member
  • *
  • Posts: 41
Re: Alt-G does not work any more
« Reply #46 on: April 06, 2018, 05:48:49 pm »
@rvk
I saw your report at bugtracker that you refer only 125% DPI.
I noticed that NOT only at 125%, but any time I change the current xxx% DPI, it crashes
and I have to follow your...
Quote
If you want this working in Lazarus 1.8.2 just open up procedurelist.pas (with lazarus.lpi open), goto the form (F12) and toggle something and save it again. Rebuild the Lazarus ide again and it should work

rvk

  • Hero Member
  • *****
  • Posts: 3467
Re: Alt-G does not work any more
« Reply #47 on: April 06, 2018, 05:50:44 pm »
I saw your report at bugtracker that you refer only 125% DPI.
I noticed that NOT only at 125%, but any time I change the current xxx% DPI, it crashes
It happens at 125% when it is designed for 100%.

It could be that if you design it @ 125% (save it) it could crash at 100% again.
Did you try it at 100% (with a saved procedurelist.lfm @ 125%)?

GetMem

  • Hero Member
  • *****
  • Posts: 3205
Re: Alt-G does not work any more
« Reply #48 on: April 06, 2018, 05:52:48 pm »
125% was just an example. The point is if the design time dpi is different from the runtime dpi the IDE crashes. 

rvk

  • Hero Member
  • *****
  • Posts: 3467
Re: Alt-G does not work any more
« Reply #49 on: April 06, 2018, 05:54:15 pm »
Yes, it could be as simple as a rounding problem. The toolbar needing to be put at a position but it can't be put there because of a rounding problem (because different designtime/runtime dpi). In that case the toolbar is not at the expected position and the loop starts over again. (Maybe, but it was hard to trace/diagnose)

Relativity

  • Jr. Member
  • **
  • Posts: 95
Re: Alt-G does not work any more
« Reply #50 on: April 06, 2018, 09:13:04 pm »
I can only say that through Control Panel > Appearance and Personalization > Display I coud see that I am on 125 % and this is indicated as default. That is, 125 % is the default.

rvk, I don't understand much of your posts, because they are far beyond the limits of my knowledge, sorry.
I only wanted to ask: what do you mean by design time dpi ?
How do you explain that it crashes also when I create a new project and I do alt-g ? Is in that case the runtime not the same as the design time ?

"How'm I gonna get through?"
  -- Pet Shop Boys

rvk

  • Hero Member
  • *****
  • Posts: 3467
Re: Alt-G does not work any more
« Reply #51 on: April 06, 2018, 10:26:01 pm »
I can only say that through Control Panel > Appearance and Personalization > Display I coud see that I am on 125 % and this is indicated as default. That is, 125 % is the default.
For me 100% is default and recommended. But that might depend on the size and resolution of your screen.

Quote
I only wanted to ask: what do you mean by design time dpi ?
With design-time I meant in which dpi setting the IDE is designed. It's the IDE that crashes on 125% dpi because it was originally designed at 100%. Most designers design at 100% because designing at another setting could cause problems when running on 100% (and it was designed on something different).

Since the IDE (and procedurelist.lfm) was designed at 100%, when displaying at 125% it needs to resize during runtime. Perhaps there is some roundoff where it can't put the toolbar correctly at the top and it gets stuck in a loop.

You can fix this quite easily yourself.
Open up ide\lazarus.lpi project.
Press Ctrl+F12 and open procedurelist.pas
Press F12 to view the form
Resize it slightly (it doesn't really matter)
Press F12 again to view the code
Choose File > Save (or Ctrl+S) to save it
Now choose Tools > Configure Builds
Choose Clean up + Build all at the top
Choose Build at the bottom
Lazarus will now recompile itself with your changed form and the ProcedureList will work

This is because you changed the procedurelist form, it is now saved with a setting of 120DPP in designtime and resizing the form work correctly now.

Of course this is a bug which still exists in trunk (development version) so it has to be corrected in the original release by someone. (hence the bug-report I submitted)

rvk

  • Hero Member
  • *****
  • Posts: 3467
Re: Alt-G does not work any more
« Reply #52 on: April 20, 2018, 10:51:48 am »
Fixed in trunk revision 57674 by Ondrej.
Fix is also targeted for Lazarus 1.8.4.

https://bugs.freepascal.org/view.php?id=33575

zamtmn

  • Sr. Member
  • ****
  • Posts: 347
Re: Alt-G does not work any more
« Reply #53 on: April 23, 2018, 10:55:05 pm »
r57674 have bad consequences.
Code: Pascal  [Select]
  1. unit Unit1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, Forms, Controls, Graphics, Dialogs,
  9.   ComCtrls,StdCtrls;
  10.  
  11. type
  12.  
  13.   { TForm1 }
  14.  
  15.   TForm1 = class(TForm)
  16.     procedure _onCreateHandler(Sender: TObject);
  17.   private
  18.  
  19.   public
  20.  
  21.   end;
  22.  
  23. var
  24.   Form1: TForm1;
  25.  
  26. implementation
  27.  
  28. {$R *.lfm}
  29.  
  30. { TForm1 }
  31.  
  32. procedure TForm1._onCreateHandler(Sender: TObject);
  33. var
  34.   tb:TToolBar;
  35.   cb:TComboBox;
  36. begin
  37.   tb:=TToolBar.Create(self);
  38.   cb:=TComboBox.Create(tb);
  39.   cb.Align:=alRight;
  40.   cb.Parent:=tb;
  41.   tb.Parent:=self;
  42. end;
  43.  
  44. end.
with r57673 - ComboBox located right side
with r57674 - ComboBox located left side

windows 7, trunk Lazarus and trunk FPC
« Last Edit: April 23, 2018, 10:57:32 pm by zamtmn »

rvk

  • Hero Member
  • *****
  • Posts: 3467
Re: Alt-G does not work any more
« Reply #54 on: April 24, 2018, 11:44:17 am »
r57674 have bad consequences.
I don't think TToolButton is supposed to contain a right aligned TComboBox. It is for TToolButtons which, when they are added to the point they overflow at the right, they continue on a new line.

In Delphi a TComboBox dropped on a TToolbar also can't be aligned right.

univan

  • Newbie
  • Posts: 1
Re: Alt-G does not work any more
« Reply #55 on: May 11, 2018, 05:19:32 am »
I can only say that through Control Panel > Appearance and Personalization > Display I coud see that I am on 125 % and this is indicated as default. That is, 125 % is the default.
For me 100% is default and recommended. But that might depend on the size and resolution of your screen.

Quote
I only wanted to ask: what do you mean by design time dpi ?
With design-time I meant in which dpi setting the IDE is designed. It's the IDE that crashes on 125% dpi because it was originally designed at 100%. Most designers design at 100% because designing at another setting could cause problems when running on 100% (and it was designed on something different).

Since the IDE (and procedurelist.lfm) was designed at 100%, when displaying at 125% it needs to resize during runtime. Perhaps there is some roundoff where it can't put the toolbar correctly at the top and it gets stuck in a loop.

You can fix this quite easily yourself.
Open up ide\lazarus.lpi project.
Press Ctrl+F12 and open procedurelist.pas
Press F12 to view the form
Resize it slightly (it doesn't really matter)
Press F12 again to view the code
Choose File > Save (or Ctrl+S) to save it
Now choose Tools > Configure Builds
Choose Clean up + Build all at the top
Choose Build at the bottom
Lazarus will now recompile itself with your changed form and the ProcedureList will work

This is because you changed the procedurelist form, it is now saved with a setting of 120DPP in designtime and resizing the form work correctly now.

Of course this is a bug which still exists in trunk (development version) so it has to be corrected in the original release by someone. (hence the bug-report I submitted)

fix it on windows 10 . Screen DPI 125%

rvk

  • Hero Member
  • *****
  • Posts: 3467
Re: Alt-G does not work any more
« Reply #56 on: May 11, 2018, 05:26:07 am »
fix it on windows 10 . Screen DPI 125%
It's already fixed.
See my previous post.
Fixed in trunk revision 57674 by Ondrej.
Fix is also targeted for Lazarus 1.8.4.
https://bugs.freepascal.org/view.php?id=33575

If you can't wait for 1.8.4 you can fix it yourself. (Also see my last post, the one you quoted).

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus