on xenial help sign in
Fix the optimization ^_^
commit11c51889412fd283b22ef42cd94bc638a0877dde authorAlbert Astals <albert.astals@canonical.com> dateTue 1 Apr 2014, 09:46 (13 years ago) parentd45da6f
3 files changed+4−2
qml/Dash/Card.qml+2 qml/Dash/CardFilterGrid.qml+1−1 qml/Dash/CardHeader.qml+1−1
qml/Dash/Card.qml+2
@@ -26,6 +26,7 @@ AbstractButton {
2626 property real fontScale: 1.0
2727 property int headerAlignment: Text.AlignLeft
2828 readonly property int headerHeight: headerLoader.item ? headerLoader.item.height : 0
29+ property int fixedHeaderHeight: -1
2930
3031 property bool showHeader: true
3132
@@ -203,6 +204,7 @@ AbstractButton {
203204 fontColor: inOverlay ? "white" : summary.color
204205 useMascotShape: !backgroundLoader.active && !inOverlay
205206 headerAlignment: root.headerAlignment
207+ height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight
206208
207209 Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.SnapDuration } }
208210 }
qml/Dash/CardFilterGrid.qml+1−1
@@ -51,7 +51,7 @@ DashRenderer {
5151 id: card
5252 width: cardTool.cardWidth
5353 height: cardTool.cardHeight
54− headerHeight: cardTool.headerHeight
54+ fixedHeaderHeight: cardTool.headerHeight
5555 anchors.horizontalCenter: parent.horizontalCenter
5656 objectName: "delegate" + index
5757 cardData: model
qml/Dash/CardHeader.qml+1−1
@@ -36,7 +36,7 @@ Item {
3636 property color fontColor: Theme.palette.selected.backgroundText
3737
3838 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
4040
4141 Row {
4242 id: row