~elopio/unity8/fix1335548-click_scope_item

« back to all changes in this revision

Viewing changes to qml/Dash/CardCarousel.qml

  • Committer: Leo Arias
  • Date: 2014-07-10 14:13:39 UTC
  • mfrom: (973.1.63 unity8)
  • Revision ID: leo.arias@canonical.com-20140710141339-hep6nmh2jdqq9pa3
Merged with trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        cacheBuffer: 1404 // 18px * 13gu * 6
41
41
        model: cardCarousel.model
42
42
 
43
 
        onClicked: cardCarousel.clicked(index, null)
44
 
        onPressAndHold: cardCarousel.pressAndHold(index)
45
 
 
46
43
        property real fontScale: 1 / selectedItemScaleFactor
47
44
        property real headerHeight: cardTool.headerHeight / selectedItemScaleFactor
48
45
 
51
48
 
52
49
            property bool explicitlyScaled
53
50
            property var model
 
51
            property int index
54
52
            enabled: false
55
53
 
 
54
            objectName: "carouselDelegate" + index
 
55
 
 
56
            function clicked() { cardCarousel.clicked(index, model.result) }
 
57
            function pressAndHold() { cardCarousel.pressAndHold(index, model.result) }
 
58
 
56
59
            sourceComponent: cardTool.cardComponent
57
60
            onLoaded: {
58
 
                item.objectName = "carouselDelegate" + index;
59
61
                item.fixedHeaderHeight = Qt.binding(function() { return carousel.headerHeight; });
60
62
                item.height = Qt.binding(function() { return cardTool.cardHeight; });
61
63
                item.cardData = Qt.binding(function() { return model; });
64
66
                item.fontScale = Qt.binding(function() { return carousel.fontScale; });
65
67
                item.showHeader = Qt.binding(function() { return loader.explicitlyScaled; });
66
68
                item.artShapeBorderSource = "none";
 
69
                item.scopeStyle = cardCarousel.scopeStyle;
67
70
            }
68
71
 
69
72
            BorderImage {