Recent

Author Topic: The "Enable DWARF" dialog - before starting the debugger.  (Read 9330 times)

Arioch

  • Sr. Member
  • ****
  • Posts: 421
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #90 on: September 27, 2022, 04:21:32 pm »
Another screenshot, now from Linux Mint (gtk2), switched to 192ppi screen resolution. At least while these scaling issues are not fixed, we should return to the old dialog...

can you show other forms for comparison? and maybe thewhole desktop with proper and impproper forms/dialogs

I see problems with having no bitmaps of larger size (does stock LCL has something like TSVGBitmap for glyphs?), but as for the rest i do not see "problems" but rather a window being rendered despite a very limiting environment.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #91 on: September 27, 2022, 04:40:22 pm »
Maybe it is enough to set   Dialog.Form.Scaled=True

lcl\lcltaskdialog.pas line 840
  Dialog.Form := TEmulatedTaskDialog.CreateNew(Application);


Otherwise line 860
Code: Pascal  [Select][+][-]
  1.       aWidth := Dialog.Form.Canvas.TextWidth(Inst);
  2.       if (aWidth>300) or (Dialog.Form.Canvas.TextWidth(Content)>300) or
  3.          (length(Buttons)>40) then
  4.         aWidth := 480 else
  5.         aWidth := 420;
  6.  

needs to be scaled for DPI / or relative to the screen width

Arioch

  • Sr. Member
  • ****
  • Posts: 421
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #92 on: September 27, 2022, 04:47:50 pm »
Otherwise line 860  needs to be scaled for DPI / or relative to the screen width

Do you remember a joke about daughter, driving her car in wrong lane?

You would not have to scale "line 860" but ALL of the procedure, where all the controls and their bounds are ad hoc calculated wit hpixel accuracy (up to the point of "on Windows add 1 px, on Linux do not")

So, in the end it would be, IMHO, more simple to drop that code and just make a regular window in Form Designer using .AutoSize and .Align on most if not all controls.

wp

  • Hero Member
  • *****
  • Posts: 11912
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #93 on: September 27, 2022, 10:55:08 pm »
So, go ahead...

wp

  • Hero Member
  • *****
  • Posts: 11912
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #94 on: September 28, 2022, 01:02:03 pm »
Fixed scaling. Tested on Linux @192ppi --> some issues left (why is the row of buttons wrapped?)

wp

  • Hero Member
  • *****
  • Posts: 11912
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #95 on: September 28, 2022, 10:13:00 pm »
Ondrej fine-tuned it, and now it's correctly scaled.

 

TinyPortal © 2005-2018