Menu

#360 Many forms have display problems when scaling is > 100 for all monitors in Delphi 12

Closed
closed-fixed
None
5
2024-12-07
2024-02-02
No

Please check if GExperts forms can be fixed for scaled HiDPI mode:

GExperts - About

GExperts - Configuration - Experts (list)
GExperts - Configuration - Usage Statistics

GExperts - Configuration - Experts - Grep
GExperts - Configuration - Experts - Grep Results
GExperts - Configuration - Experts - Clipboard History
GExperts - Configuration - Experts - Components To Code
GExperts - Configuration - Experts - Code Editor Enchancements
GExperts - Configuration - Experts - Go To Configuration
GExperts - Configuration - Experts - Project Dependencies

GExperts - Configuration - Editor Experts - Code formatter
GExperts - Configuration - Editor Experts - Remove mathcing lines
GExperts - Configuration - Editor Experts - Sort Selected lines (Sort options)
GExperts - Configuration - Editor Experts - Expand Macro Template

Please see attached screenshots:

14 Attachments

Discussion

  • Thomas Mueller

    Thomas Mueller - 2024-02-03

    What monstrous scaling are you using there? Most dialogs look fine at scaling 175 which I assumed was the maximum anybody would be using with current monitors. I'll look at the dialogs with scaling 350 now, which is the maximum Windows 10 allows on my system.

     
    • Sergio Barbery

      Sergio Barbery - 2024-02-03

      Windows 11, Scale 175%, Delphi 12.

       
  • Thomas Mueller

    Thomas Mueller - 2024-02-03

    The following dialogs look fine with Scaling 350 in revision #4197:

    • About
    • Config Dialog needs to scroll further down, apart from that it looks fine
    • Usage Statistics
    • Grep Results Options (Caption should be changed from "... Options" to "... Configuration" for consistency.
    • Backup Project Config
    • Clipboard History Config
    • Rename Components Config
    • Components To Code Config (Caption should be changed to "... Configuration")
    • Filger Explicit Properties Config (Caption should be changed to "... Configuration")
    • Favorite Files Config
    • Subdialogs of Filter Exceptions Config (Add/Edit/Delete)
    • Go to Config
    • Grep Search Options (Caption should be changed to "... Configuration")
    • Comment Empty Code Blocks Config (Caption should be changed to "... Configuration")
    • Procedure List Config
    • Replace Components Config (Caption should be changed to "... Configuration", also adapt the column width)
    • Set Component Properties Config (should adapt the column width)
    • Source Export Config
    • Set Tab Order Config (Caption should be changed to "... Configuration", also the icons are very small)
    • To Do List Config (Caption should be changed to "... Configuration")
    • Uses Clause Manager Config (Caption should be changed to "... Configuration")
    • Paste As Config (Caption should be changed to "... Configuration")
    • Code Formatter Config (Spacing Table isn't quite right)
    • Code Formatter Captitalization
    • Align Lines Config (Caption should be changed to "... Configuration")
    • Comment Code Config (Caption should be changed to "... Configuration", also adapt the column width)
    • Insert Date/Time Config (Caption should be changed to "... Configuration")
    • Editor Popup Menu Config (Caption should be changed to "... Configuration", also adapt the column width)
    • Prevous/Next Identifier Config (Caption should be changed to "... Configuration")
    • Remove Matching Lines Config (Caption should be changed to "... Configuration", also have a vertical scroll bar)
    • Sort Selected Lines Config (Caption should be changed to "... Configuration")
    • Expand Macro Templates Config (Caption should be changed to "... Configuration", also adapt the column width)
    • Expand Macro Templages subdialogs (add/edit)
    • General GExperts Message dialog
    • ASCII Chart (Buttons get a bit too large)
    • Backup Project
    • Class Browser options (shouldn't that dialog also be available in the GExperts Config?)
    • Class Browser properties
    • Class Browser Find Class
    • Clean Directories
    • Code Proofreader
    • Editor Bookmarks
    • Editor Bookmarks subdialogs
    • Instant Grep
    • Keyboard Shortcuts (should resize column widths)
    • Message Dialog (Icons should be resized)
    • Rename Components
    • Replace Components
    • Select Components
    • Set Tab Order (icons are very small)
    • Uses Clause Manager
    • Sort Selected Lines
    • Insert Warn Diredctive
    • Paste As
    • Convert Strings

    broken:

    • Grep Config
    • Editor Enhancements Config
    • Edit Path Config
    • Filter Exceptions Config (Caption should be changed to "... Configuration")
    • Keyboard Macro Library Config (Caption should be changed to "... Configuration")
    • Message Dialog Config (Caption should be changed to "... Configuration")
    • Open File Config
    • Project Dependency Config
    • Code Proofreader Config (mostly fine, but Test button must move, also change the caption)
    • Replace Components Subdialog (Add/Edit) does not change correctly when moved from 350 to 100 scaling
    • Add Dock Window warning is unreadable
    • Class Browser inheritance chart is missing the connection lines and the shapes are a bit too small
    • Clipboard History scales properly when shown, but not when moved from 350 to 100 scaling
    • Code Librarian scales properly when shown, but not when moved from 350 to 100 scaling, also switching the layout does not work
    • Compoent Grid scales properly when shown, but not when moved from 350 to 100 scaling
    • Edit Path does not scale the edit control
    • Insert IFDEF does not scale the list
    • Go To expert does not resize the list
    • Grep Search ->Test does not scal the result edit
    • Grep Results does not scale the results list and code corectly
    • Keyboard Macro Library does not scale when first shown, but scales correctly when moved between different scalings
    • Open File scales properly when shown, but not when moved from 350 to 100 scaling
    • Procedure List scales properly when shown, but not when moved from 350 to 100 scaling
    • Project Dependencies scales properly when shown, but not when moved from 350 to 100 scaling
    • Source Export
    • To Do List
    • IfDef EditorExpert
     

    Last edit: Thomas Mueller 2024-02-03
  • Thomas Mueller

    Thomas Mueller - 2024-02-03
    • summary: GExeperts dialogs for scaled HighDPI --> GExperts dialogs for scaled HighDPI
    • assigned_to: Thomas Mueller
     
  • Thomas Mueller

    Thomas Mueller - 2024-02-03

    Testing on Windows 11 shows that some dialogs that look fine on Windows 10 are broken on Windows 11, e.g. the About Dialog looks like it does in your screenshot in Windows 11 but looks fine in Windows 10.
    In Windows 11 the fonts are much larger than in Windows 10.
    As if I needed yet another complication. :-(

     
  • Thomas Mueller

    Thomas Mueller - 2024-02-03

    Even worse: When I use all my monitors in Remote Desktop (one with scaling now set to 175 and one with scaling 100) instead of only the one with HiDPI, everything looks the same in Windows 11 and Windows 10.
    WTF?!

     

    Last edit: Thomas Mueller 2024-02-03
  • Thomas Mueller

    Thomas Mueller - 2024-02-03

    And guess what: If I use only the HiDPI monitor in Remote Desktop to Windows 10, I get exactly the same display problems as in Windows 11.
    WTFF?!

     
  • Thomas Mueller

    Thomas Mueller - 2024-02-03

    At least it does not depend on whether I use the monitor(s) locally or via remote desktop. The effect is the same if I only use my HiDPI monitor locally.

     
  • Thomas Mueller

    Thomas Mueller - 2024-02-04
    • summary: GExperts dialogs for scaled HighDPI --> Many forms have display problems when scaling is > 100 for all monitors in Delphi 12
    • Group: New --> Retest
     
  • Thomas Mueller

    Thomas Mueller - 2024-02-04

    The problem was twofold:

    1. Apparently each form is created with the scaling of the main monitor first. If that main monitor has a scaling of 100, the code worked fine. If it has a scaling > 100 TCtrlDpiScaler.Assign determined the wrong font size for DPI=96 and used that later for scaling which resulted in larger fonts. This has now been fixed. After that change all labels with ParentFont=False looked fine.

    2. ParentFont=True does not actually work as expected. The control fonts were rescaled independently from the parent font. I have now added code in TCtrlDpiScaler.ResizeFont to handle this case by explicitly assigning the parent's font size if ParentFont=True.

    This seems to work for both cases: Main monitor scaling = 100 and main monitor scaling > 100, at least on my computer.

    The change is in revision #4199

    Could you please compile a new DLL from the current sources and test it?

     

    Last edit: Thomas Mueller 2024-02-04
    • Sergio Barbery

      Sergio Barbery - 2024-02-04

      @twm Thanks! Now (build 4201 ) seems it works in all broken forms.
      Could you please check what is with "Procedure list" form?
      Can not change size of Code section (no splitter) and procedure list seems truncated.

       
      • Thomas Mueller

        Thomas Mueller - 2024-02-04

        That's a differnet bug (and I think there is already a report for it): The splitter is between the preview memo and the status bar. It should of course be between the list and the preview.
        It works fine, if you change the configuration to show the preview on the right hand side of the dialog.
        The reason is that the implementation splitter component is a stinking pile of^D^D^D^D^D^D^D^D^D^D^D^D^D^Dsuboptimal so it is very difficult to ensure that it is placed between two particular components.

        Edit: Yes, the bug report was #268: Procedure List - Splitter align incorrect
        I was assuming I had already fixed the problem in revision #3928. Apparently it's back again. :-(

         

        Last edit: Thomas Mueller 2024-02-04
  • Thomas Mueller

    Thomas Mueller - 2024-02-04

    There is now a partial fix for the procedure list problem in revision #4205
    It still doesn't work in call cases

     
  • Thomas Mueller

    Thomas Mueller - 2024-09-10

    Fixed the list in the Go to dialog in revision #4311

     
  • Thomas Mueller

    Thomas Mueller - 2024-12-07
    • status: open --> closed-fixed
    • Group: Retest --> Closed
     
  • Thomas Mueller

    Thomas Mueller - 2024-12-07

    I'm closing this report now. Most of the issues seem to be fixed. If anybody finds other scaling issues, please open new reports, one for each form.

     

Log in to post a comment.