[Lazarus] Controlling DPI

Hans-Peter Diettrich DrDiettrich1 at aol.com
Sun Mar 29 16:17:32 CEST 2009


Graeme Geldenhuys schrieb:

>> Changing the screen resolution, for one or more monitors, requires an
>> restart of the graphics system (GDI, X11...), of course, because it
>> affects the desktop and all windows on the monitor(s).
> 
> In Gnome you can select the DPI and it will affect all Gnome based
> applications - without a restart.

Well, it can be a soft restart, where all affected elements of the 
screen are repositioned and repainted in the new scaling.

> Firefox and Thunderbird also allow
> you to select a specific DPI which then only applies to the
> application.

On KDE e.g. Firefox only allows to adjust the font size, and the font 
sizes in HTML documents are application dependent, not expressed in 
points. The text in the title bar etc. are not affected by such an 
adjustment.

>  But I think with all these, they simply take the real
> screen dpi and calculate the zoom factor for the applications.
> 
> All this is doable in FPC/Lazarus already.

The OP asked *how* to do that. When it depends on the screen manager 
(Windows/KDE/Gnome...), the procedures may depend on the selected 
widgetset in Lazarus?

DoDi




More information about the Lazarus mailing list