UweRaabe / DFMScaling

Stores DFM files as 96 DPI while allowing to design in High DPI
MIT License
21 stars 5 forks source link

DFMScaling

Stores DFM files as 96 DPI while allowing to design in High DPI.

The approach used registers a notifier to each open DFM editor to intercept its AfterSave event. It loads the just saved DFM file, creates a seprate instance from it, scales it down to 96 dpi and saves overwriting the previous DFM file.

That implies that only the written DFM is modified, while the internal representation stays intact. Especially showing a form as text still shows the values in the designer (i.e. in High DPI).

You get the best user experience when setting the VCL Designer High DPI Mode to Automatic. This also allows to disable the designer Mimic the system style without the weird look when in Low DPI mode.

The downscaling is also done when the mode is set to User Editable. This may be made configurable in a future version.

If the down scaling is not feasible for some project, the package can be disabled in the project options Packages dialog.