Modernize and redesign the Night Color config window
ClosedPublic

Authored by filipf on Jun 8 2019, 3:51 PM.

Details

Diff Detail

Repository
R119 Plasma Desktop
Branch
modernize-redesign-nightcolor-config (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 12749
Build 12767: arc lint + arc unit
filipf created this revision.Jun 8 2019, 3:51 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 8 2019, 3:51 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
filipf requested review of this revision.Jun 8 2019, 3:51 PM
filipf updated this revision to Diff 59404.Jun 8 2019, 3:55 PM

initial cleanup

filipf edited the test plan for this revision. (Show Details)Jun 8 2019, 3:56 PM
filipf added reviewers: VDG, ngraham, romangg, mart.
filipf added inline comments.
kcms/nightcolor/package/contents/ui/main.qml
21–22

Are these 3 imports needed? I couldn't figure out what they were doing.

Lovely! Can you align the bottom fields with the combobox above them?

filipf added a comment.Jun 9 2019, 8:21 AM

Lovely! Can you align the bottom fields with the combobox above them?

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.

filipf updated this revision to Diff 59682.Jun 12 2019, 8:11 PM

getting there; all is aligned now, it's just that the content needs to be unstiffened

filipf edited the test plan for this revision. (Show Details)Jun 12 2019, 8:11 PM

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, ++

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.

filipf updated this revision to Diff 59688.Jun 12 2019, 9:22 PM

make the form layouts respond to window resizing

filipf retitled this revision from WIP: Modernize and redesign the Night Color config window to Modernize and redesign the Night Color config window.Jun 12 2019, 9:24 PM
filipf edited the summary of this revision. (Show Details)
filipf edited the test plan for this revision. (Show Details)
filipf updated this revision to Diff 59689.Jun 12 2019, 9:26 PM
filipf edited the summary of this revision. (Show Details)

spacing of the main ColumnLayout needs to be 0

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

Still, this looks great as-is. Probably landable now IMO, and a big improvement.

davidedmundson accepted this revision.Jun 12 2019, 9:41 PM
This revision is now accepted and ready to land.Jun 12 2019, 9:41 PM
ngraham accepted this revision.Jun 12 2019, 9:42 PM

Thanks for having a look guys :)

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

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!

Looks nice! :)

This revision was automatically updated to reflect the committed changes.