Summary: | Can't select appropriate scale setting in Display Settings | ||
---|---|---|---|
Product: | [Applications] systemsettings | Reporter: | Allan Gardner <allan.e.gardner+kde> |
Component: | kcm_kscreen | Assignee: | kscreen-bugs-null <kscreen-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | fanzhuyifan, nate, plasma-bugs, xaver.hugl |
Priority: | NOR | ||
Version: | 6.3.0 | ||
Target Milestone: | --- | ||
Platform: | NixOS | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/kscreen/-/commit/9b1ce203e2e3c97b9755e05d65570b7193280673 | Version Fixed In: | 6.3.3 |
Sentry Crash Report: |
Description
Allan Gardner
2025-02-21 17:02:49 UTC
Rounding to 5% increments is currently intentional here. Can you describe the reason why this isn't sufficient for your purposes? I have a monitor with pixel pitch 0.27 mm, and a monitor with pixel pitch 0.155 mm, both the same height. So to get them to match up exactly I need a scaling factor of 0.27 / 0.155 = 174.19%. Rounding to 174.16% is closer than rounding to 175%. With 175%, there is a noticeable mismatch when for example a window is split across the two screens. Can you explain more about how 5% increments are intentional? It seems from bug 412447 the original intention was to "allow the user to enter an arbitrary [scaling] value" and then due to limitations of the Qt toolkit (specifically the lack of a decimal-input spinbox), this was retargeted to 5% increments. You can use kscreen-doctor to set such a specific scale. (In reply to Allan Gardner from comment #0) > Changing the constant from 20.0 to 120.0 in > https://invent.kde.org/plasma/kscreen/-/blob/d35969460d99e042ae21802cf767c682ef31dfe0/kcm/ui/OutputPanel.qml#L107 > appears to be sufficient to fix this. If you adjust the step size to still be 5%, I think that would be fine. Feel free to send a MR. A possibly relevant merge request was started @ https://invent.kde.org/plasma/kscreen/-/merge_requests/351 OK. I guess libkscreen itself also rounds to x/120, https://invent.kde.org/plasma/libkscreen/-/blob/4ced246d90d4a7f609b03a9d97174f04dda043b4/backends/kwayland/waylandoutputdevice.cpp#L379. At least, that is the behavior with kscreen-doctor. I am not so sure about setting the scale to 5%. I did it in the merge request, but the behavior is (for example) that it goes from 174.167% to 179.167%, rather than going from 174.167% to 175% to 180%. It seems like it would need some logic to jump to multiples of 5%. I think it is easier to just allow the fine increments of 1/120. Git commit 8721fdad89958c295632f5e03fb8592f5f9892dc by Allan Gardner. Committed on 24/02/2025 at 17:36. Pushed by zamundaaa into branch 'master'. kcm: Support scaling with denominator of 120 This matches the denominator used in Wayland's fractional scaling M +3 -2 kcm/ui/OutputPanel.qml https://invent.kde.org/plasma/kscreen/-/commit/8721fdad89958c295632f5e03fb8592f5f9892dc Git commit 9b1ce203e2e3c97b9755e05d65570b7193280673 by Xaver Hugl. Committed on 24/02/2025 at 18:10. Pushed by zamundaaa into branch 'Plasma/6.3'. kcm: Support scaling with denominator of 120 This matches the denominator used in Wayland's fractional scaling (cherry picked from commit 8721fdad89958c295632f5e03fb8592f5f9892dc) Co-authored-by: Allan Gardner <allan.e.gardner+kde@googlemail.com> M +3 -2 kcm/ui/OutputPanel.qml https://invent.kde.org/plasma/kscreen/-/commit/9b1ce203e2e3c97b9755e05d65570b7193280673 |