~unity-team/unity8/unity8-card-overlay

« back to all changes in this revision

Viewing changes to qml/Dash/Card.qml

  • Committer: Michał Sawicz
  • Date: 2014-02-05 20:47:57 UTC
  • Revision ID: michal.sawicz@canonical.com-20140205204757-9w6u9ichauso0nmz
Bring changes from newscopes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
    property alias fontScale: header.fontScale
27
27
 
 
28
    property bool showHeader: true
 
29
 
28
30
    implicitWidth: childrenRect.width
29
31
    implicitHeight: summary.y + summary.height
30
32
 
69
71
        }
70
72
 
71
73
        height: units.gu(8)
72
 
        opacity: 0.6
 
74
        opacity: header.opacity * 0.6
73
75
        visible: template && template["overlay"] && artShape.visible && artShape.image.status === Image.Ready || false
74
76
 
75
77
        property var source: ShaderEffectSource {
98
100
                lowp vec4 tex = texture2D(source, coord);
99
101
                gl_FragColor = vec4(0, 0, 0, tex.a) * qt_Opacity;
100
102
            }"
101
 
 
102
103
    }
103
104
 
104
105
    CardHeader {
119
120
                return parent.left;
120
121
            }
121
122
            right: parent.right
122
 
            margins: template && template["overlay"] ? units.gu(1) : 0
123
 
            topMargin: 0
124
123
        }
125
124
 
126
125
        mascot: cardData && cardData["mascot"] || ""
127
126
        title: cardData && cardData["title"] || ""
128
127
        subtitle: cardData && cardData["subtitle"] || ""
 
128
 
 
129
        opacity: showHeader ? 1 : 0
 
130
 
 
131
        Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.SnapDuration } }
129
132
    }
130
133
 
131
134
    Label {