Port to Kirigami FormLayout and QQC2.
Details
- Reviewers
ngraham romangg mart davidedmundson - Group Reviewers
VDG Plasma - Maniphest Tasks
- T10273: Make KCMs consistent and apply the KDE HIG to them as much as possible
- Commits
- R119:cd6a8e081536: Modernize and redesign the Night Color config window
Before:
After:
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.
kcms/nightcolor/package/contents/ui/main.qml | ||
---|---|---|
21–22 | Are these 3 imports needed? I couldn't figure out what they were doing. |
I tried to do that with twinFormLayouts but it creates binding loop problems that can even be traced back to FormLayout.qml.
OK, so everything works nice if the form layouts simply reside in main.qml as components. It's when we spawn them through loaders that we get binding loops and misalignment (even if twinFormLayouts is specified!). The loader is not specifying geometry to the layouts so everything gets messed up.
Unless there is some way to address this, I can remove the extra .qml view files, i.e. merge them with main.qml. There's also the method of anchoring the source components in the loader left and right. Neither seem ideal.
getting there; all is aligned now, it's just that the content needs to be unstiffened
getting there; all is aligned now, it's just that the content needs to be unstiffened
What does that mean
Please remove the WIP tag when things are ready for review.
Generally this looks good to me, ++
Form layouts should be horizontally centered and adjust to the window size. Right now they're painfully stuck on the left side and won't budge when resizing the window.
If I had to guess, it's because they're inside a column that doesn't span the full width of the page.
Much better! Is there a reason why we need a ColumnLayout to hold those two FormLayouts in main.qml? Could all the stuff in the second one just go into the first one instead? Then you could get rid of the Columnlayout entirely
Thanks for having a look guys :)
That's what I wanted to do in the first place and was the first version I posted here, but it resulted in big binding loop issues and twinFormLayouts of loader forms failing to achieve alignment with the main one.
There's still some points of improvement here I think:
- child form layouts are only interlinked with the main one, but not vice versa -> the odds aren't big, but should there be any language where the labels in child layouts are longer that the ones in the main one, it will mess up the alignment
- old bug: the times in the Locations mode should automatically be updated upon entering new coordinates (right now it only does so when switching modes)
- kcm doesn't have the totally left aligned form layout mode when you shrink the window -> might be because of the SimpleKCM wrapper, not sure
Fixing those things might come a lot easier to someone with more experience, but I'll keep them in mind for when I have more free time.
For now I'll land this as I think the UI is in dire need of improvement!