Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2019-03

VirtualTreeView rendering on Cocoa

10 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrea Mauri

Dear All,
I noticed that text and images drawn in VirtualTreeView using Cocoa are not well defined, quite blurry with respect to the other component (labels fonts, images...).
Why?
There is something that can be done to draw properly on Virtualtreeview too? See attached image of the OnlinePakcageManager.
Thanks in advance.
Andrea

I am using Lazarus trunk, 2.1.0 r60622M FPC 3.0.4 x86_64-darwin-cocoa (alpha)

I posted the same question on forum here:
http://forum.lazarus.freepascal.org/index.php/topic,44599.0.html -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190312/16b548af/attachment-0001.html> -------------- next part --------------
A non-text attachment was scrubbed...
Name: opm_virtualtreeview_cocoa.jpg
Type: image/jpeg
Size: 31856 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190312/16b548af/attachment-0001.jpg>

Reply by email

Graeme Geldenhuys
to Andrea Mauri
Andrea Mauri wrote
well defined, quite blurry with respect to the other component (labels fonts, images...). Why?

It looks like VirtualTreeView is not Hi-DPI aware. Just a guess, but it seems that it is generating the treeview rendering on a internal image buffer (not hi-dpi sized), and then when blitting that to the actual window canvas, the image gets scaled - hence the pixelation. I didn't actually look at the the virtualtree code (it is *massive*), but what I described is a common problem with custom drawn components.

Regards,
Graeme

Reply by email

Andrea Mauri
to Graeme Geldenhuys
Show quoted text 9 lines
It looks like VirtualTreeView is not Hi-DPI aware. Just a guess, but it seems that it is generating the treeview rendering on a internal image buffer (not hi-dpi sized), and then when blitting that to the actual window canvas, the image gets scaled - hence the pixelation. I didn't actually look at the the virtualtree code (it is *massive*), but what I described is a common problem with custom drawn components.

Thank you Graeme!
Someone know if is there any chance to get it working properly on Cocoa too?
I can try to have a look at it but my skills in this field are limited. Where should I look?
Any suggestion?
Andrea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190313/1057666d/attachment.html>

Reply by email

Graeme Geldenhuys
to Andrea Mauri
Andrea Mauri wrote
Where should I look?

I suggest you simply browse through the source code. First check to see if there is not maybe an existing property that must be set to manually enable Hi-DPI support. If not, search the internet about other users using VirtualTreeview and there questions about Hi-DPI. If still no answers, simply work through the code to see what could be changed to introduce Hi-DPI support. At least, this is what I would have done.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Andrea Mauri
to Alexey: Graeme, if VTV code is good then blurring problem can be solved - by setting DblBuffered…
Show quoted text 5 lines
Graeme, if VTV code is good then blurring problem can be solved - by setting DblBuffered to false, no?

DoubleBuffered, True or False does not have any effect. Andrea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190313/fe07933c/attachment.html>

Reply by email