~josephjamesmills/ubuntutv/maps_fanart

« back to all changes in this revision

Viewing changes to shell/dash/RendererCoverFlow.qml

  • Committer: Joseph Mills
  • Date: 2012-07-28 14:57:10 UTC
  • Revision ID: josephjamesmills@gmail.com-20120728145710-sy00cvq1ja8o9qad
Lots of cool stuff. watch my youtube videos to see  what else has been added

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
        property int duration: 120
38
38
 
39
39
        anchors.fill: parent
40
 
        anchors.topMargin: Units.tvPx(80)
 
40
        anchors.topMargin: Units.tvPx(140)
41
41
        anchors.bottomMargin: Units.tvPx(60)
42
42
        /* Make sure the first and last items are offsetted by margin */
43
43
        anchors.leftMargin: margin
45
45
        cacheBuffer: margin*2
46
46
        focus: true
47
47
        orientation: ListView.Horizontal
48
 
        spacing: Units.tvPx(56)
 
48
        spacing: Units.tvPx(80)
49
49
        highlightMoveSpeed: -1
50
50
        highlightMoveDuration: 230
51
51
        highlightRangeMode: ListView.ApplyRange
75
75
            angle: Utils.segmentsLinearInterpolation(segments, [63.0, 0.0, 0.0, -63.0], absoluteX)
76
76
            property real origin
77
77
            origin: Utils.segmentsLinearInterpolation(segments, [width, width, 0.0, 0.0], absoluteX)
78
 
            //Behavior on angle {SmoothedAnimation {duration: flow.duration; velocity: -1}}
 
78
            //Behavior on angle {SmoothedAnimation {durshadowation: flow.duration; velocity: -1}}
79
79
            transform: Rotation { origin.x: button.origin; origin.y: height/2; axis { x: 0; y: 1; z: 0 } angle: button.angle}
80
80
 
81
81
            scale: Utils.segmentsLinearInterpolation(segments, [0.8, 1.0, 1.0, 0.8], absoluteX)
87
87
                id: iconImage
88
88
 
89
89
                anchors.top: parent.top
90
 
                anchors.topMargin: Units.tvPx(0)
 
90
                anchors.topMargin: Units.tvPx(-10)
91
91
                height: Units.tvPx(225)
92
92
                anchors.left: parent.left
93
93
                anchors.right: parent.right
94
94
                Item {
95
 
                    width: image.width
96
 
                    height: image.height
97
 
                    anchors.centerIn: image
 
95
                    width: parent.width
 
96
                    height: parent.height
 
97
//                    anchors.centerIn
98
98
 
99
99
                    Image {
100
100
                        //anchors.verticalCenter: parent.bottom
101
101
                        anchors.horizontalCenter: parent.horizontalCenter
102
102
                        anchors.top: parent.top
103
 
                        anchors.topMargin: Units.tvPx(370)
104
 
                        width: Units.tvPx(330)
105
 
                        height: Units.tvPx(80)
 
103
                        anchors.topMargin: Units.tvPx(350)
 
104
                        width: Units.tvPx(380)
 
105
                        height: Units.tvPx(120)
106
106
                        source: "artwork/coverflow_shadow.png"
107
107
                        fillMode: Image.Center
108
108
                    }
109
109
 
110
110
                    Image {
111
111
                        source: "artwork/selection_glow.png"
112
 
                        anchors.fill: parent
113
 
                        anchors.margins: Units.tvPx(-27)
 
112
                        anchors.fill: image
 
113
//                        height: Units.tvPx(350)
 
114
                        anchors.margins: Units.tvPx(-45)
114
115
                        opacity: button.activeFocus ? 1.0 : 0.0
115
116
                        Behavior on opacity {NumberAnimation {duration: 200; easing.type: Easing.OutQuad}}
116
117
                    }
125
126
                        border.color: "transparent"
126
127
                        radius: Units.tvPx(2)
127
128
                    }
128
 
                }
129
 
 
130
 
 
131
 
                Image {
132
 
                    id: image
133
 
 
134
 
                    anchors.centerIn: parent
135
 
                    anchors.top: parent.top
136
 
                    anchors.topMargin: Units.tvPx(140)
137
 
                    width: Units.tvPx(225)
138
 
                    height: Units.tvPx(350)
139
 
                    fillMode: Image.Stretch
140
 
                    clip: true
141
 
                    source:if(status == Image.Error ) iconHint;
142
 
                           else
143
 
                               source: "image://icons/"+iconHint;
144
 
 
145
 
                    sourceSize.width: width
146
 
                    sourceSize.height: height
147
 
                    smooth: true
148
 
                    asynchronous: true
149
 
                    opacity: status == Image.Ready ? 1.0 : 0.0
150
 
                    Behavior on opacity {NumberAnimation {duration: 200; easing.type: Easing.InOutQuad}}
151
 
                }
152
 
            }
153
 
 
154
 
            Rectangle {
155
 
                anchors.fill: iconImage
156
 
                anchors.top: parent.top
157
 
                //anchors.topMargin: Units.tvPx(250)
158
 
                opacity: button.state == "hovered" || button.state == "selected-hovered" ? 0.4 : 0.0
159
 
                Behavior on opacity { NumberAnimation { duration: 100 } }
160
 
            }
161
 
 
162
 
            TextMultiLine {
163
 
                id: label
164
 
 
165
 
                anchors.top: iconImage.bottom
166
 
                anchors.bottom: parent.bottom
167
 
                anchors.right: parent.right
168
 
                anchors.left: parent.left
169
 
                anchors.topMargin: Units.tvPx(150)
170
 
 
171
 
                text: name
172
 
                opacity: Utils.segmentsLinearInterpolation(segments, [0.0, 1.0, 1.0, 0.0], absoluteX)
173
 
                //Behavior on opacity {SmoothedAnimation {duration: flow.duration; velocity: -1}}
174
 
                color: "#ffffff"
175
 
                horizontalAlignment: Text.AlignHCenter
176
 
                fontSize: "small"
177
 
                style: Text.Raised
178
 
                styleColor: "#1e1e1e"
 
129
 
 
130
                    Image {
 
131
                        id: image
 
132
 
 
133
                        anchors.centerIn: parent
 
134
                        anchors.top: parent.top
 
135
                        anchors.topMargin: Units.tvPx(120)
 
136
                        width: Units.tvPx(250)
 
137
                        height: Units.tvPx(400)
 
138
                        fillMode: Image.Stretch
 
139
                        clip: true
 
140
                        source:if(status == Image.Error ){
 
141
                                 source: iconHint
 
142
                               }else{
 
143
                                   source: "image://icons/"+iconHint;
 
144
}
 
145
                        sourceSize.width: width
 
146
                        sourceSize.height: height
 
147
                        smooth: true
 
148
                        asynchronous: true
 
149
                        opacity: status == Image.Ready ? 1.0 : 0.0
 
150
                        Behavior on opacity {NumberAnimation {duration: 200; easing.type: Easing.InOutQuad}}
 
151
                    }
 
152
 
 
153
                    Rectangle {
 
154
                        id: txtrectangle
 
155
                        anchors.fill: image.Center
 
156
                        anchors.top: parent.top
 
157
                        anchors.topMargin: Units.tvPx(250)
 
158
                        opacity: button.state == "hovered" || button.state == "selected-hovered" ? 0.4 : 0.0
 
159
                        Behavior on opacity { NumberAnimation { duration: 100 } }
 
160
                    }
 
161
 
 
162
                    TextMultiLine {
 
163
                        id: label
 
164
                        wrapMode: Text.WordWrap
 
165
                        anchors.top: txtrectangle.bottom
 
166
//                        anchors.bottom: parent.bottom
 
167
                        anchors.right: parent.right
 
168
                        anchors.left: parent.left
 
169
                        anchors.topMargin: Units.tvPx(80)
 
170
 
 
171
                        text: name
 
172
                        opacity: Utils.segmentsLinearInterpolation(segments, [0.0, 1.0, 1.0, 0.0], absoluteX)
 
173
                        //Behavior on opacity {SmoothedAnimation {duration: flow.duration; velocity: -1}}
 
174
                        color: "#ffffff"
 
175
                        horizontalAlignment: Text.AlignHCenter
 
176
                        fontSize: "small"
 
177
                        style: Text.Raised
 
178
                        styleColor: "#1e1e1e"
 
179
                    }
 
180
                }
179
181
            }
180
182
        }
181
183
    }