on xenial help sign in
Show overlay on current item only.
commitb99b54d9a53be282ca84ca0be0a755d85c2020ec authorMichał Karnicki <michal.karnicki@canonical.com> dateWed 5 Feb 2014, 14:58 (13 years ago) parent2de49c7
2 files changed+9−1
qml/Dash/Card.qml+8−1 qml/Dash/CardCarousel.qml+1
qml/Dash/Card.qml+8−1
@@ -25,6 +25,8 @@ AbstractButton {
2525
2626 property alias fontScale: header.fontScale
2727
28+ property bool showHeader: true
29+
2830 implicitWidth: childrenRect.width
2931 implicitHeight: summary.y + summary.height
3032
@@ -69,7 +71,7 @@ AbstractButton {
6971 }
7072
7173 height: header.height
72− opacity: 0.6
74+ opacity: showHeader ? 0.6 : 0
7375 visible: template && template["overlay"] && artShape.visible && artShape.image.status === Image.Ready || false
7476
7577 property var source: ShaderEffectSource {
@@ -99,6 +101,7 @@ AbstractButton {
99101 gl_FragColor = vec4(0, 0, 0, tex.a) * qt_Opacity;
100102 }"
101103
104+ Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.SnapDuration } }
102105 }
103106
104107 CardHeader {
@@ -126,6 +129,10 @@ AbstractButton {
126129 mascot: cardData && cardData["mascot"] || ""
127130 title: cardData && cardData["title"] || ""
128131 subtitle: cardData && cardData["subtitle"] || ""
132+
133+ opacity: showHeader ? 1 : 0
134+
135+ Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.SnapDuration } }
129136 }
130137
131138 Label {
qml/Dash/CardCarousel.qml+1
@@ -66,6 +66,7 @@ DashRenderer {
6666 property var model
6767
6868 enabled: false
69+ showHeader: ListView.isCurrentItem // XXX doesn't work
6970
7071 fontScale: 1 / selectedItemScaleFactor
7172 }