Code review comment for lp:~unity-team/unity8/dash-as-app

Revision history for this message
Michael Zanetti (mzanetti) wrote :

> +++ qml/Stages/PhoneStage.qml 2014-07-27 01:55:40 +0000
> @@ -116,6 +117,8 @@ Item {
> contentWidth: spreadRow.width - shift
> contentX: -shift
>
> + readonly property bool isActive: shiftedContentX > 0 ||
> spreadDragArea.dragging
> +
> // The flickable needs to fill the screen in order to get touch
> events all over.
> // However, we don't want to the user to be able to scroll back all
> the way. For
> // that, the beginning of the gesture starts with a negative value
> for contentX
>
>
> In QML (unlike in C++) boolean properties are named simply "foo", not "isFoo".
> I would choose a less overloaded/generic term than "active" if possible.
> What's the difference between being "active" and being "interactive". I would
> add a comment explaining what it means to be "active" there.

I added a comment. I tend to agree that the "is*" is quite uncommon for qml, however, as you realized yourself just "active" is a bit overloaded and I think isActive describes best what's happening. I kept the name but added a comment what it does.

« Back to merge proposal