Skip to content

Draft: Card and CardsGridView rework

This MR aims to improve and fix Card and CardsGridView. How it works in the background and add extra features (e.g. alignment option, card height, banner margin). These are some of my goals that myself already poorly implemented in testing branch a long time ago. This is going to take quite some time to get done properly and will probably be done next month.

  • private/BannerImage.qml -[] Remove code that is specified for Card.qml

  • private/CardBanner.qml

  • Automatic rounded corners on horizontal mode

  • Add a nicer way to interact with corner radius for BannerImage and Card widget

  • Corner radius struct (specify corner radius with one property)

  • Remove unnecessary code

  • controls/Card.qml

    • Actions alignment property
    • Use CardBanner instead of BannerImage to avoid problems in the future when editing code
    • Make card widget fill delegate component instead that has card size.
    • Do not expose the internal API, use aliases/properties
  • controls/templates/AbstractCard.qml

    • Specify minimum height, width
    • Remove unnecessary code
  • controls/CardsGridView & private/CardsGridViewPrivate

  • Stop using left margin to position cards (should allow us to do fewer calculations)

  • Use cell width and height

  • GridView delegate should have the size

These are just a few examples that this MR will contain. MR dep

Edited by Matej Starc

Merge request reports