[Lazarus] VirtualTreeView rendering on Cocoa

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] VirtualTreeView rendering on Cocoa

Free Pascal - Lazarus mailing list
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)


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus

opm_virtualtreeview_cocoa.jpg (42K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] VirtualTreeView rendering on Cocoa

Free Pascal - Lazarus mailing list
On 12/03/2019 07:36, Andrea Mauri via lazarus 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

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] VirtualTreeView rendering on Cocoa

Free Pascal - Lazarus mailing list

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

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] VirtualTreeView rendering on Cocoa

Free Pascal - Lazarus mailing list
On 13/03/2019 10:14, Andrea Mauri via lazarus 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
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] VirtualTreeView rendering on Cocoa

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
 Graeme, if VTV code is good then blurring problem can be solved - by setting DblBuffered to false, no?
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] VirtualTreeView rendering on Cocoa

Free Pascal - Lazarus mailing list
On 13/03/2019 11:23, Alexey via lazarus wrote:
> by setting DblBuffered to false, no?

I honestly don't know the current code of VTV. I haven't used VTV since
around 2008. :) Your best bet, and quickest answer would be simply to
try what you suggested and see what the output looks like.


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
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] VirtualTreeView rendering on Cocoa

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list

 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

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] VirtualTreeView rendering on Cocoa

Free Pascal - Lazarus mailing list
On Wed, Mar 13, 2019 at 11:27 AM Andrea Mauri via lazarus
<[hidden email]> wrote:
>
> DoubleBuffered, True or False does not have any effect.

Hi Andrea,
Have you posted this bug on bugtracker?
Any news about it?

best regards,
Marcos Douglas
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] VirtualTreeView rendering on Cocoa

Free Pascal - Lazarus mailing list
Have you posted this bug on bugtracker?
Any news about it?


Dear Marcos,
I have no updates on this, I have not yet posted on bugtracker. I will do ASAP.
Thank you,
Andrea 

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] VirtualTreeView rendering on Cocoa

Free Pascal - Lazarus mailing list

Have you posted this bug on bugtracker?
Any news about it?


Reported as 0035279
Andrea
 

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus