Sign in Join

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

Mailing lists / lazarus / 2018-02

Hi-dpi cursors in app?

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Ondrej Pokorny
to AlexeyT
AlexeyT wrote
I have cursors https://github.com/Alexey-T/ATSynEdit/tree/master/atsynedit/res they look very bad in win10 scale 150%. What to do here?

I haven't looked into the hi-dpi cursors issue yet. But I assume you have to create several .cur files (one file for every resolution you want to support) and then pick up the correct size for your DPI.

I don't think multi-resolution CUR files are (or can be) supported. But I may be wrong here.

Ondrej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180203/e0f03acf/attachment.html>

Reply by email

AlexeyT
to Ondrej Pokorny
But I assume you have to create several .cur files (one file for every

resolution you want to support)

I don't know how to make .cur file for bigger DPI. It is bitmap with big size? it will paint same way too.

Regards, Alexey

Reply by email

Ondrej Pokorny
to AlexeyT
AlexeyT wrote 5 lines
>But I assume you have to create several .cur files (one file for every resolution you want to support) I don't know how to make .cur file for bigger DPI. It is bitmap with big size? it will paint same way too.

Just create a .cur with a bigger image.

Ondrej

Reply by email

José Mejuto
to AlexeyT: resolution you want to support) I don't know how to make .cur file for bigger DPI. It is…
AlexeyT wrote 6 lines
>But I assume you have to create several .cur files (one file for every resolution you want to support) I don't know how to make .cur file for bigger DPI. It is bitmap with big size? it will paint same way too.

Hello,

Not tested but it could be a solution for your problem (windows):

http://www.rw-designer.com/cursor-maker

Quoted from a page:

"Windows 8 automatically changes the size of mouse pointers (cursors) depending on DPI settings of display. The relations between DPI and the size of cursors are roughly as follows:

100% : 32×32 pixel
150% : 48×48 pixel
200% : 64×64 pixel

This is done by the OS’s selecting one image from multiple images of different sizes contained in a cursor file."

Reply by email

Ondrej Pokorny
to José Mejuto
José Mejuto wrote 5 lines
The relations between DPI and the size of cursors are roughly as follows:         100% : 32×32 pixel         150% : 48×48 pixel         200% : 64×64 pixel

Correct - I completely forgot about it.

And Lazarus has High-DPI cursors already (and working - I tested on Windows 10). Alexey, see lcl\images\cursors

Ondrej

Reply by email