Code review comment for lp:~zsombi/ubuntu-ui-toolkit/79-more-simplification

Revision history for this message
Tim Peeters (tpeeters) wrote :

> > 66 - leftMargin: (leading && panel.ListItem.item) ?
> > -units.gu(4 * panel.ListItem.item.swipeOvershoot) : 0
> > 67 - rightMargin: (!leading && panel.ListItem.item) ?
> > -units.gu(4 * panel.ListItem.item.swipeOvershoot) : 0
> > 68 + leftMargin: (leading && styledItem) ? -units.gu(4 *
> > styledItem.swipeOvershoot) : 0
> > 69 + rightMargin: (!leading && styledItem) ? -units.gu(4 *
> > styledItem.swipeOvershoot) : 0
> >
> >
> > Is the swipeOvershoot defined in grid units?
> > The docs don't say that:
> >
> > /*!
> > * \qmlproperty real ListItem::swipeOvershoot
> > * The property configures the overshoot value on swiping. Its default value
> > is
> > * configured by the \l {ListItemStyle}{style}. Any positive value overrides
> > the
> > * default value, and any negative or undefined value resets it back to the
> > default.
> > */
> >
> > So I'd rather have it in pixels. You can still set it like swipeOvershoot:
> > units.gu(2) then.
> >
> > Also, why is it multiplied by 4 here?
>
> Yeah, it supposed to be in pixels, but tbh, this whole overshooting did not
> work ever properly. It'll be removed completely, like the whole
> ListItemPanel.qml in the next MR. The multiplication was needed to be able to
> cover the area on the eventual spring animation bouncing, when the panel was
> too short and the background of the ListItem got visible :/
>
> So, no more overshoot in the next MR, should we still bother fixing this?

No need to spend time on fixing something that will be removed tomorrow :)

« Back to merge proposal