kcm/energy: Code polish

Some small clean-up changes to modernize and simplify the QML and JS codebase to ease further improvements

  • Remove stray white spaces

  • Clean up imports: Remove version numbers and unused import

  • Do no set fix size within the Graph component. Also moves the id up top

  • Annotate method and improve readability

  • Port from JS var to let and const

  • Set internal properties as readonly

  • Use Qt.color methods instead of the string variants

    (except for transparent color which is more clear this way)

Separate commits for reviewing. Meant to be squashed

Merge request reports

Loading