Summary: | Resolution of screen is incorrect | ||
---|---|---|---|
Product: | [Applications] systemsettings | Reporter: | Justin Zobel <justin> |
Component: | kcm_wallpaper | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | ASSIGNED --- | ||
Severity: | minor | CC: | fanzhuyifan, josh, kde, meven, nate |
Priority: | NOR | Keywords: | qt6 |
Version: | 5.92.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | attachment-2637097-0.html |
Description
Justin Zobel
2024-01-25 00:50:10 UTC
Is the laptop screen using 125% scaling? Created attachment 165225 [details] attachment-2637097-0.html Yes On Fri, 26 Jan 2024, 9:34 am Nate Graham, <bugzilla_noreply@kde.org> wrote: > https://bugs.kde.org/show_bug.cgi?id=480291 > > Nate Graham <nate@kde.org> changed: > > What |Removed |Added > > ---------------------------------------------------------------------------- > CC| |nate@kde.org > Resolution|--- |WAITINGFORINFO > Status|REPORTED |NEEDSINFO > > --- Comment #1 from Nate Graham <nate@kde.org> --- > Is the laptop screen using 125% scaling? > > -- > You are receiving this mail because: > You reported the bug. Can confirm. The issue is that it's dividing the resolution by the scale factor when it shouldn't (the KScreen KCM doesn't). It looks like this data comes from QApplication::screens() which provides the per-screen pixel width and height in logical (aka scaled) pixels, not physical pixels. So we either need to use another data source to get the resolution, or else un-scale them by multiplying the numbers we have by the screen's scale factor. That could lead to loss of precision, though, so I think it's not preferred. I tried it anyway, and multiplying by QScreen::devicePixelRatio() doesn't work since that rounds to integers, so it gives incorrect results with fractional scale factors. The same bug happens in the tablet KCM, so it's definitely related to the QScreen API we're using. It doesn't affect the display kcm of course, because that's using KScreen. As a fast fix I suggest dropping the label that shows the resolution (In reply to David Edmundson from comment #6) > As a fast fix I suggest dropping the label that shows the resolution Someone suggested the same thing and I'm considering that today. And if the maintainer definitely wants to keep it, that should be a good reason to go through the hoops for a larger fix. A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3841 |