on xenial help sign in
Show overlay on current item only.
b99b54dMichał Karnicki
qml/Dash/Card.qml+8−1
@@ -25,6 +25,8 @@ AbstractButton {
25
25
26 property alias fontScale: header.fontScale
26 property alias fontScale: header.fontScale
27
27
28+ property bool showHeader: true
29+
28 implicitWidth: childrenRect.width
30 implicitWidth: childrenRect.width
29 implicitHeight: summary.y + summary.height
31 implicitHeight: summary.y + summary.height
30
32
@@ -69,7 +71,7 @@ AbstractButton {
69 }
71 }
70
72
71 height: header.height
73 height: header.height
72− opacity: 0.6
74+ opacity: showHeader ? 0.6 : 0
73 visible: template && template["overlay"] && artShape.visible && artShape.image.status === Image.Ready || false
75 visible: template && template["overlay"] && artShape.visible && artShape.image.status === Image.Ready || false
74
76
75 property var source: ShaderEffectSource {
77 property var source: ShaderEffectSource {
@@ -99,6 +101,7 @@ AbstractButton {
99 gl_FragColor = vec4(0, 0, 0, tex.a) * qt_Opacity;
101 gl_FragColor = vec4(0, 0, 0, tex.a) * qt_Opacity;
100 }"
102 }"
101
103
104+ Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.SnapDuration } }
102 }
105 }
103
106
104 CardHeader {
107 CardHeader {
@@ -126,6 +129,10 @@ AbstractButton {
126 mascot: cardData && cardData["mascot"] || ""
129 mascot: cardData && cardData["mascot"] || ""
127 title: cardData && cardData["title"] || ""
130 title: cardData && cardData["title"] || ""
128 subtitle: cardData && cardData["subtitle"] || ""
131 subtitle: cardData && cardData["subtitle"] || ""
132+
133+ opacity: showHeader ? 1 : 0
134+
135+ Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.SnapDuration } }
129 }
136 }
130
137
131 Label {
138 Label {
qml/Dash/CardCarousel.qml+1
@@ -66,6 +66,7 @@ DashRenderer {
66 property var model
66 property var model
67
67
68 enabled: false
68 enabled: false
69+ showHeader: ListView.isCurrentItem // XXX doesn't work
69
70
70 fontScale: 1 / selectedItemScaleFactor
71 fontScale: 1 / selectedItemScaleFactor
71 }
72 }