~dandrader/unity8/fixBuild_lp1328850

« back to all changes in this revision

Viewing changes to tests/plugins/Dash/organicgridtry.qml

  • Committer: CI bot
  • Author(s): Albert Astals
  • Date: 2014-06-06 11:38:27 UTC
  • mfrom: (942.3.1 makeTryVJHJOGwork)
  • Revision ID: ps-jenkins@lists.canonical.com-20140606113827-kudyirinv59yh4he
Make tryVerticalJournal, tryHorizontalJournal and tryOrganicGrid work again 

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
            rowSpacing: 10
38
38
            width: parent.width
39
39
            height: implicitHeight > 100 ? implicitHeight : 100
40
 
            delegateCreationBegin: lvwph.contentY
41
 
            delegateCreationEnd: lvwph.contentY + lvwph.height
 
40
            displayMarginBeginning: {
 
41
                if (grid.y + grid.height <= 0) {
 
42
                    // Not visible (item at top of the list viewport)
 
43
                    return -grid.height;
 
44
                } else if (grid.y >= lvwph.height) {
 
45
                    // Not visible (item at bottom of the list viewport)
 
46
                    return 0;
 
47
                } else {
 
48
                    return -Math.max(-grid.y, 0);
 
49
                }
 
50
            }
 
51
            displayMarginEnd: {
 
52
                if (grid.y + grid.height <= 0) {
 
53
                    // Not visible (item at top of the list viewport)
 
54
                    return 0;
 
55
                } else if (grid.y >= lvwph.height) {
 
56
                    // Not visible (item at bottom of the list viewport)
 
57
                    return -grid.height;
 
58
                } else {
 
59
                    return -Math.max(grid.height - lvwph.height + grid.y, 0)
 
60
                }
 
61
            }
42
62
 
43
63
            delegate: Rectangle {
44
64
                width: 100