pencil2d / pencil

Pencil2D is an easy, intuitive tool to make 2D hand-drawn animations. Pencil2D is open source and cross-platform.
http://pencil2d.org
GNU General Public License v2.0
1.46k stars 272 forks source link

High DPI display support #822

Open scribblemaniac opened 6 years ago

scribblemaniac commented 6 years ago

Screens with higher pixel densities and resolutions are becoming more common, especially among artists. This is what Pencil2D currently looks like on a 4k display: screenshot from 2017-12-01 23-16-27 There are issues all over the place, from clipped text in the timeline to a minuscule toolbox to a rather small color palette (that is with the large option!) and color wheel. If I'm not mistaken there were multiple issues related to this in the forums, but to my surprise I could not find an issue on it on Github. So this issue will be for tracking all of the changes that need to be done to make Pencil2D work just as well on high resolution displays, if not better.

See here for some details on Qt and High DPI support: https://doc.qt.io/qt-5/highdpi.html

Jose-Moreno commented 6 years ago

Here's reference to https://github.com/pencil2d/pencil/issues/597 which has a record of several related cases that span from this issue alone.

scribblemaniac commented 6 years ago

@Jose-Moreno Thank you, how did I not find that! I even commented on it 🤣 This will still be useful for specifically tracking High DPI support integration I think.

chchwy commented 6 years ago

According to http://doc.qt.io/qt-5/highdpi.html, we can set Qt::AA_EnableHighDpiScaling The font will be a little bit blurry after setting the attribute on a high dpi display. So it's not an ultimate solution, but it's a quick fix for tiny UI.

chchwy commented 6 years ago

Introducing a quick fix in f6c80da0. A more proper solution will be done in 0.6.2.

MrStevns commented 1 year ago

Scribble, what's the status of this as of our latest nightly build?

I am using a retina display although not 4k and it looks fine but i can't speak much for the small icons since my resolution is only about 2k

scribblemaniac commented 1 year ago

I just tested a build from master and the nightly build AppImage on my 4k laptop (Ubuntu 22.04). The situation is greatly improved since my initial post. Almost everything looks good now. There are still some icons non-svg icons that are blurry, but that will probably be fixed by #1361. The only significant issue I saw in my limited testing is that the tool cursor icons are too small. If that is fixed, I would not be opposed to resolving this issue, although it would be best if we could have someone test high dpi support on macOS and Windows first.

MrStevns commented 1 year ago

Excellent, so we're almost there. Thanks for looking into it.

We will get new tool cursor icons in the UI redesign PR too. When you have time, would you mind trying out that PR and see if it's been improved. Here's the latest snapshot: https://get.pencil2d.org/@Fatih20/6389400624/pencil2d-linux-42-2023-10-03

When i run the application with the highest resolution I can, the icons seem to scale properly for me, at least the same amount the system icons does, so I'm not sure small cursor icons is a problem on Mac OS.