on xenial help sign in
Bring Cards closer to design
commit7e8f39a76e1682159c7cda3b04ccbc1d48043232 authorMichał Sawicz <michal.sawicz@canonical.com> dateFri 14 Mar 2014, 15:44 (13 years ago) parent378050fbe79543
4 files changed+14−7
qml/Dash/CardHeader.qml+8−4 qml/Dash/Previews/PreviewActions.qml+1−1 qml/Dash/Previews/PreviewHeader.qml+3−1 qml/Dash/Previews/PreviewTextSummary.qml+2−1
qml/Dash/CardHeader.qml+8−4
@@ -24,6 +24,7 @@ Item {
2424 property alias subtitle: subtitleLabel.text
2525
2626 property alias titleWeight: titleLabel.font.weight
27+ property alias titleSize: titleLabel.fontSize
2728
2829 // FIXME: Saviq, used to scale fonts down in Carousel
2930 property real fontScale: 1.0
@@ -58,6 +59,7 @@ Item {
5859 // TODO karni: Icon aspect-ratio is 8:7.5. Revisit these values to avoid fraction of pixels.
5960 width: units.gu(6)
6061 height: units.gu(5.625)
62+ anchors.verticalCenter: parent.verticalCenter
6163 visible: useMascotShape && image && image.status === Image.Ready
6264 readonly property int maxSize: Math.max(width, height)
6365
@@ -70,6 +72,7 @@ Item {
7072
7173 width: source ? mascotShape.width : 0
7274 height: mascotShape.height
75+ anchors.verticalCenter: parent.verticalCenter
7376 visible: !useMascotShape && status === Image.Ready
7477
7578 sourceSize { width: mascotShape.maxSize; height: mascotShape.maxSize }
@@ -81,17 +84,18 @@ Item {
8184 Column {
8285 objectName: "column"
8386 width: parent.width - x
84− spacing: units.gu(0.5)
87+ spacing: units.gu(0.25)
88+ anchors.verticalCenter: parent.verticalCenter
8589
8690 Label {
8791 id: titleLabel
8892 objectName: "titleLabel"
8993 anchors { left: parent.left; right: parent.right }
9094 elide: Text.ElideRight
91− font.weight: Font.DemiBold
95+ font.weight: Font.Normal
96+ fontSize: "small"
9297 wrapMode: Text.Wrap
9398 maximumLineCount: 2
94− fontSize: "small"
9599 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
96100 color: fontColor
97101 }
@@ -101,9 +105,9 @@ Item {
101105 objectName: "subtitleLabel"
102106 anchors { left: parent.left; right: parent.right }
103107 elide: Text.ElideRight
108+ fontSize: "small"
104109 font.weight: Font.Light
105110 visible: titleLabel.text && text
106− fontSize: "x-small"
107111 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
108112 color: fontColor
109113 }
qml/Dash/Previews/PreviewActions.qml+1−1
@@ -24,7 +24,7 @@ import QtQuick 2.1
2424PreviewWidget {
2525 id: root
2626
27− height: row.height
27+ height: row.height + units.gu(1)
2828
2929 Row {
3030 id: row
qml/Dash/Previews/PreviewHeader.qml+3−1
@@ -34,5 +34,7 @@ PreviewWidget {
3434 title: root.widgetData["title"] || ""
3535 subtitle: root.widgetData["subtitle"] || ""
3636 width: parent.width
37+
38+ titleSize: "large"
3739 }
38−}
40+}
qml/Dash/Previews/PreviewTextSummary.qml+2−1
@@ -58,7 +58,8 @@ PreviewWidget {
5858 }
5959 height: (!seeMore.visible || seeMore.more) ? contentHeight : contentHeight / lineCount * (maximumCollapsedLineCount - 2)
6060 clip: true
61− fontSize: "medium"
61+ fontSize: "small"
62+ lineHeight: 1.2
6263 color: Theme.palette.selected.backgroundText
6364 opacity: .8
6465 text: widgetData["text"]