[vlc-devel] [PATCH] draw the toolbar with DPI-aware dimensions

Francois Cartegnie fcvlcdev at free.fr
Thu Nov 6 17:03:34 CET 2014


Le 06/11/2014 14:44, Jarrad Whitaker a écrit :
> Because the volume widget is also based on a pixmap, I have
> directly drawn it scaled so it is a little blurry. I would like to
> mitigate this by having Qt draw the requisite triangle and mask
> directly instead of using a pixmap; again though, I consider the
> jump in usability to justify sending my changes as is, as the
> cosmetic fixups will have quite a long tail of work (especially to
> ensure they don't break the current pixel-perfect layout at 96
> dpi).

AFAIR, it is not possible to do this properly without Qt5, and an
arbitrary scalingfactor isn't the Qt way. (See hdpi guide)

Regarding the drawing of the widget itself, I already have this on my
stash (and that's not as easy as drawing a triangle). It just comes to
a dead end when you realize Qt only provides square and lines
primitives for drawing controls. There's no way to get any style
property such as colors & emboss level to match current theme. (unless
we get rid of the non square shape).

Francois





More information about the vlc-devel mailing list