Remove stepsize 24 from DPI spinbox inside kcm fontconfig
ClosedPublic

Authored by kurmikon on May 4 2020, 9:49 PM.

Details

Summary

Since the spinbox read and write the DPI value "as is", without performing any format change, there's no need to set a stepsize of 24.

As reported here, xdpyinfo, xrdb and fontconfig does not expect values multiple of 24 and sometimes the proper DPI value is an unsigned integer different than the default 96, to be manually calculated because xorg can't auto determine it correctly (see here).

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kurmikon created this revision.May 4 2020, 9:49 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 4 2020, 9:49 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
kurmikon requested review of this revision.May 4 2020, 9:49 PM

That doesn't explain why we're changing the step size.

No-one wants to click the up arrow 100 times.

kurmikon added a comment.EditedMay 4 2020, 10:14 PM

That doesn't explain why we're changing the step size.

No-one wants to click the up arrow 100 times.

I have to set 101 and the default is 96. The arrows are there but I can't set 101 because of the stepsize. Tell me if this is sane. The majority of monitors have DPI around 96. Obviously, if you want an higher value, you can set it manually.

IIRC the idea was that people who have specific DPI in mind would type it in, and clicking on the arrows to navigate one at a time would be frustrating--hence the large step size. Maybe we went too far in the direction of efficiency at the expense of familiarity, because the 24px step size suggests inaccurately that intermediate values can't be entered?

kurmikon added a comment.EditedMay 5 2020, 7:33 AM

Maybe we went too far in the direction of efficiency at the expense of familiarity, because the 24px step size suggests inaccurately that intermediate values can't be entered?

That's the point. This option is an advanced setting, disabled by default, that the user will enable to set a specific value already in mind. There's nothing to navigate in my opinion. It's also an option to be set accurately, so introducing a stepsize may give the wrong message that intermediate values can't be set.

Then the message divide to stepsize is to be deleted because is pointless.

There's some merit to your argument, yeah.

kcms/fonts/package/contents/ui/main.qml
295

that's the default value, so you can just remove this line entirely

kurmikon updated this revision to Diff 82001.May 5 2020, 3:48 PM

Removed stepsize property, default value 1.

@davidedmundson are you okay with this?

kurmikon marked an inline comment as done.May 12 2020, 10:01 AM

@ngraham No reply after one week. I think this can be merged.

ngraham accepted this revision.May 12 2020, 1:01 PM

That's not how it works. Patches need to be properly reviewed. I can do so on behalf of VDG, bud I'd like @davidedmundson's sign-off too, because IIRC he was the one who proposed or implemented this.

This revision is now accepted and ready to land.May 12 2020, 1:01 PM

Got confirmation from @davidedmundson that this is okay. Can you provide an email address so I can land your patch with correct git authorship information?

Got confirmation from @davidedmundson that this is okay. Can you provide an email address so I can land your patch with correct git authorship information?

kurmikon@libero.it

This revision was automatically updated to reflect the committed changes.