on xenial help sign in
Fix the optimization ^_^
11c5188Albert Astals
qml/Dash/Card.qml+2
@@ -26,6 +26,7 @@ AbstractButton {
26 property real fontScale: 1.0
26 property real fontScale: 1.0
27 property int headerAlignment: Text.AlignLeft
27 property int headerAlignment: Text.AlignLeft
28 readonly property int headerHeight: headerLoader.item ? headerLoader.item.height : 0
28 readonly property int headerHeight: headerLoader.item ? headerLoader.item.height : 0
29+ property int fixedHeaderHeight: -1
29
30
30 property bool showHeader: true
31 property bool showHeader: true
31
32
@@ -203,6 +204,7 @@ AbstractButton {
203 fontColor: inOverlay ? "white" : summary.color
204 fontColor: inOverlay ? "white" : summary.color
204 useMascotShape: !backgroundLoader.active && !inOverlay
205 useMascotShape: !backgroundLoader.active && !inOverlay
205 headerAlignment: root.headerAlignment
206 headerAlignment: root.headerAlignment
207+ height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight
206
208
207 Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.SnapDuration } }
209 Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.SnapDuration } }
208 }
210 }
qml/Dash/CardFilterGrid.qml+1−1
@@ -51,7 +51,7 @@ DashRenderer {
51 id: card
51 id: card
52 width: cardTool.cardWidth
52 width: cardTool.cardWidth
53 height: cardTool.cardHeight
53 height: cardTool.cardHeight
54− headerHeight: cardTool.headerHeight
54+ fixedHeaderHeight: cardTool.headerHeight
55 anchors.horizontalCenter: parent.horizontalCenter
55 anchors.horizontalCenter: parent.horizontalCenter
56 objectName: "delegate" + index
56 objectName: "delegate" + index
57 cardData: model
57 cardData: model
qml/Dash/CardHeader.qml+1−1
@@ -36,7 +36,7 @@ Item {
36 property color fontColor: Theme.palette.selected.backgroundText
36 property color fontColor: Theme.palette.selected.backgroundText
37
37
38 visible: mascotImage.status === Image.Ready || title
38 visible: mascotImage.status === Image.Ready || title
39− height: row.height > 0 ? row.height + row.margins * 2 : 0
39+ implicitHeight: row.height > 0 ? row.height + row.margins * 2 : 0
40
40
41 Row {
41 Row {
42 id: row
42 id: row