[Lazarus] Scaling of menuitem icons
zeljko at holobit.net
Fri Oct 19 11:43:32 CEST 2018
On 10/19/2018 10:15 AM, Ondrej Pokorny via Lazarus wrote:
> > On my Linux + KDE system however icons of the IDE's main menuitems
> do not scale.
> > In KDE settings panel -> Fonts I set the "Force font's DPI" value to
> 144 which is about 150%.
> I remember I worked on it:
> 1.) Gtk2: I added support for Gtk2. See screenshot. It works well for me
> if I use "xrandr --dpi 144x144" as it is suggested in
> Your settings revealed a bug in Gtk2 bindings. Patch is attached.
> 2.) Qt: I wasn't able to add support of high-resolution icons in menus
> under Qt. My conclusion was that either Qt itself or LCL-Qt bindings do
> not support big icons in menus. When I used the correct size icon in the
> menu it was always (badly) downscaled to 16x16 pixels.
Probably the only solution is to use QProxyStyle class.
There's no QProxyStyle class in Qt4/Qt5 C bindings and to fix this
problem it should be implemented with it's overrides.
QProxyStyle can return any size for PM_SmallIconSize, but in that case
we should know what's the current size of "normal" icons in LCL.
More information about the Lazarus