QML port of fonts kcm
ClosedPublic

Authored by mart on Nov 20 2017, 3:35 PM.

Details

Summary

port the fonts kcm to QML, reviving an old branch.
UI based upon M112/411
make use of the new Kirigami FormLayout
depends from D8641
Fixes T7244

Test Plan

tried all the options

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.
mart created this revision.Nov 20 2017, 3:35 PM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 20 2017, 3:35 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham added a comment.EditedNov 20 2017, 5:24 PM

Can you mark this as "Fixes T7244", so that task will be automatically closed when this goes in?

FWIW, the list of all KCM redesign tasks can be found at https://phabricator.kde.org/tag/plasma_kcm_redesign/

hein added a subscriber: hein.Nov 21 2017, 8:50 AM
hein added inline comments.
kcms/fonts/fonts.cpp
632

Instead of always setting this to true in a prop setter, you need to implement a method that checks whether the new value is actually different from the stored configuration and then sets true or false based on that. Otherwise you are turning on the 'Apply' button but never turning it off again. Cf. LaunchFeedback::updateNeedsSave() in D8911.

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

This and similar bindings will break when the user changes the spinbox value, so after a manual adjustment e.g. defaults() won't work any longer. It needs a seperate Connections à la D8911.

mart added inline comments.Nov 21 2017, 11:31 AM
kcms/fonts/package/contents/ui/main.qml
176

no, it doesn't seem to break. when the change in value is donefrom the c++ side, which is the case of a qqc2 spinbox (as opposed to qqc1) the bindings actually stay in place, would break only if from javascript side a spinbox.value=foo was executed

mart updated this revision to Diff 22687.Nov 21 2017, 11:31 AM
  • needssave only when settings actually changed
mart edited the summary of this revision. (Show Details)Nov 21 2017, 11:32 AM

Needs more screenshots! :-)

Could we possibly take the opportunity to turn font anti-aliasing on by default instead of leaving it with "Vendor Default" (a string that doesn't have any meaning to most users)?

mart added a comment.Nov 22 2017, 4:20 PM

Could we possibly take the opportunity to turn font anti-aliasing on by default instead of leaving it with "Vendor Default" (a string that doesn't have any meaning to most users)?

i would really not mess with the distro settings, which usually have a reason. we risk to break way too many corner cases

mart added a comment.Nov 22 2017, 5:16 PM
In D8916#170830, @mart wrote:

Could we possibly take the opportunity to turn font anti-aliasing on by default instead of leaving it with "Vendor Default" (a string that doesn't have any meaning to most users)?

i would really not mess with the distro settings, which usually have a reason. we risk to break way too many corner cases

one thing that may make sense, is to indeed put a "show advanced controls" there, (thing that i usually hate ;)

mart updated this revision to Diff 22888.Nov 24 2017, 11:19 AM
  • port to new kcmcontrols
mart updated this revision to Diff 22899.Nov 24 2017, 2:27 PM
  • reparent the font dialog
This revision was not accepted when it landed; it landed in state Needs Review.Jan 23 2018, 2:47 PM
Closed by commit R119:24b960f92284: QML port of fonts kcm (authored by mart). · Explain Why
This revision was automatically updated to reflect the committed changes.