Menu

#350 Configuration dialogs for HighDPI

Closed
closed-fixed
None
5
2023-12-23
2023-12-23
No

Some configuration forms like Code Formatter Configuration and some others are missing scaled : true form property.
They are displayed incorrectly when used for HighDPI scaled monitor.

Environment:
Delphi 12, Win 11, 4k display with 175% scale

Steps:

  1. Start Delphi 12 from the start menu
  2. The default (empty) project is open
  3. On the main menu, select GExperts - Configuration
  4. Click "Configure" for Code Editor

Discussion

  • Thomas Mueller

    Thomas Mueller - 2023-12-23

    Actually, setting Scaled to false is on purpose. If set to true, all sorts of things break. The scaling is done in code instead. If it doesn't work, that's a bug and should be reported for the individual dialogs. Achim has fixed quite a few of them already, but I think the formatter config dialog wasn't reported as broken yet. I'll have a look.

     
    👍
    1

    Last edit: Thomas Mueller 2023-12-23
    • Sergio Barbery

      Sergio Barbery - 2023-12-23

      Thomas, thanks for looking into it!
      It would be nice if you or Achim check all dialogs to be displayed properly.
      I've checked all by clicking Configure buttons in GE settings and noticed few with problems. This was today's pulled version.

       
      • Thomas Mueller

        Thomas Mueller - 2023-12-23

        I use a scaling of 100 and 125 on my monitors where such problems are difficult to spot. In addition I don't use Delphi 11 and 12 in my day job (Both are simply not stable enough for that :-( ), so I simply don't see those problems at all.

         

        Last edit: Thomas Mueller 2023-12-23
  • Thomas Mueller

    Thomas Mueller - 2023-12-23
     
  • Thomas Mueller

    Thomas Mueller - 2023-12-23

    With the Formatter configuration dialog there are actually two problems (Tested in Delphi 12):

    1. When initially opended, it doesn't get scaled at all.
    2. When moved between Monitors with different scaling factors, it does get scaled and mostely looks OK with the following exceptions:
      a) On the Spacing tab, the line hight of the grid is too small.
      b) On the Misc. tab, the positions of the edit controls for Start and End are off.
      c) On the Align tab the up/down controls are positioned incorrectly
     
  • Thomas Mueller

    Thomas Mueller - 2023-12-23

    I found the problem: The dialog was centered on the GExperts configuration dialog before it had a window handle. Therefore the WMDpiChanged message handler was never called which would have adjusted it to the correct DPI. If I remove the call to TForm_CenterOn from the Execute method, it works fine.

     
  • Thomas Mueller

    Thomas Mueller - 2023-12-23
    • status: open --> closed-fixed
    • assigned_to: Thomas Mueller
    • Group: New --> Closed
     
  • Thomas Mueller

    Thomas Mueller - 2023-12-23

    Fixed in revision #4149 (only for the code formatter configuration dialog)
    Please report simliar bugs in other forms in separate reports.

     

Log in to post a comment.