[System Load Viewer] Port settings window to QQC2+Kirigami FormLayout and modernize UI
ClosedPublic

Authored by ngraham on May 6 2019, 9:17 PM.

Details

Summary
  • Port to QQC2+Kirigami FormLayout style, except for the SpinBox which cannot handle decimal values well in the QQC2 version
  • Use standard import names
  • Adjust some strings to sound a bit more natural
Test Plan
  • All features still work
  • Settings loaded correctly when the window appears and saved correctly

Diff Detail

Repository
R114 Plasma Addons
Branch
monitor-modernize-settings-window (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11657
Build 11675: arc lint + arc unit
ngraham created this revision.May 6 2019, 9:17 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 6 2019, 9:17 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.May 6 2019, 9:17 PM
ngraham retitled this revision from [System Monitor] [Timer] Port settings window to QQC2+Kirigami FormLayout and modernize UI to [System Load Viewer] [Timer] Port settings window to QQC2+Kirigami FormLayout and modernize UI.May 6 2019, 9:18 PM
ngraham retitled this revision from [System Load Viewer] [Timer] Port settings window to QQC2+Kirigami FormLayout and modernize UI to [System Load Viewer] Port settings window to QQC2+Kirigami FormLayout and modernize UI.May 6 2019, 9:25 PM

Skeleton of a QQC2 SpinBox implementation: P381

The number in the box wasn't mouse-selectable and I wasn't able to get the suffix working properly. In the end I opted to stay with the QQC1 version for now.

filipf added a subscriber: filipf.May 6 2019, 10:16 PM
filipf added inline comments.
applets/systemloadviewer/package/contents/ui/ColorSettings.qml
41

To better align the checkbox in this layout with the other layout you can set twinFormLayouts so the first one points to the second one and get:

Or you could go all the way and also make the second one point to the first one and get:

Personally I like solution no.1 more.

119

We're having weird resizing behavior because we haven't anchored the two forms to each other:

We need to anchor the bottom layout to the top one so just assign an ID to the first layout and then do something like: anchors.top: manualColors.bottom

applets/systemloadviewer/package/contents/ui/GeneralSettings.qml
57

Indentation is not working due to uppercase typo. Just change to Kirigami.Units.gridUnit and it works!

ngraham updated this revision to Diff 57692.May 7 2019, 3:09 AM
ngraham marked 3 inline comments as done.
  • Fix Units typo
  • Just put everything in one FormLayout; it's simpler
ngraham edited the test plan for this revision. (Show Details)May 7 2019, 3:10 AM
filipf accepted this revision.May 7 2019, 10:14 PM
filipf added inline comments.
applets/systemloadviewer/package/contents/ui/ColorSettings.qml
24

Don't need the import anymore

This revision is now accepted and ready to land.May 7 2019, 10:14 PM
ngraham updated this revision to Diff 57745.May 8 2019, 2:52 AM
ngraham marked an inline comment as done.

Remove unused import

This revision was automatically updated to reflect the committed changes.