on xenial help sign in
Bring Cards closer to design
7e8f39aMichał Sawicz
qml/Dash/CardHeader.qml+8−4
@@ -24,6 +24,7 @@ Item {
24 property alias subtitle: subtitleLabel.text
24 property alias subtitle: subtitleLabel.text
25
25
26 property alias titleWeight: titleLabel.font.weight
26 property alias titleWeight: titleLabel.font.weight
27+ property alias titleSize: titleLabel.fontSize
27
28
28 // FIXME: Saviq, used to scale fonts down in Carousel
29 // FIXME: Saviq, used to scale fonts down in Carousel
29 property real fontScale: 1.0
30 property real fontScale: 1.0
@@ -58,6 +59,7 @@ Item {
58 // TODO karni: Icon aspect-ratio is 8:7.5. Revisit these values to avoid fraction of pixels.
59 // TODO karni: Icon aspect-ratio is 8:7.5. Revisit these values to avoid fraction of pixels.
59 width: units.gu(6)
60 width: units.gu(6)
60 height: units.gu(5.625)
61 height: units.gu(5.625)
62+ anchors.verticalCenter: parent.verticalCenter
61 visible: useMascotShape && image && image.status === Image.Ready
63 visible: useMascotShape && image && image.status === Image.Ready
62 readonly property int maxSize: Math.max(width, height)
64 readonly property int maxSize: Math.max(width, height)
63
65
@@ -70,6 +72,7 @@ Item {
70
72
71 width: source ? mascotShape.width : 0
73 width: source ? mascotShape.width : 0
72 height: mascotShape.height
74 height: mascotShape.height
75+ anchors.verticalCenter: parent.verticalCenter
73 visible: !useMascotShape && status === Image.Ready
76 visible: !useMascotShape && status === Image.Ready
74
77
75 sourceSize { width: mascotShape.maxSize; height: mascotShape.maxSize }
78 sourceSize { width: mascotShape.maxSize; height: mascotShape.maxSize }
@@ -81,17 +84,18 @@ Item {
81 Column {
84 Column {
82 objectName: "column"
85 objectName: "column"
83 width: parent.width - x
86 width: parent.width - x
84− spacing: units.gu(0.5)
87+ spacing: units.gu(0.25)
88+ anchors.verticalCenter: parent.verticalCenter
85
89
86 Label {
90 Label {
87 id: titleLabel
91 id: titleLabel
88 objectName: "titleLabel"
92 objectName: "titleLabel"
89 anchors { left: parent.left; right: parent.right }
93 anchors { left: parent.left; right: parent.right }
90 elide: Text.ElideRight
94 elide: Text.ElideRight
91− font.weight: Font.DemiBold
95+ font.weight: Font.Normal
96+ fontSize: "small"
92 wrapMode: Text.Wrap
97 wrapMode: Text.Wrap
93 maximumLineCount: 2
98 maximumLineCount: 2
94− fontSize: "small"
95 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
99 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
96 color: fontColor
100 color: fontColor
97 }
101 }
@@ -101,9 +105,9 @@ Item {
101 objectName: "subtitleLabel"
105 objectName: "subtitleLabel"
102 anchors { left: parent.left; right: parent.right }
106 anchors { left: parent.left; right: parent.right }
103 elide: Text.ElideRight
107 elide: Text.ElideRight
108+ fontSize: "small"
104 font.weight: Font.Light
109 font.weight: Font.Light
105 visible: titleLabel.text && text
110 visible: titleLabel.text && text
106− fontSize: "x-small"
107 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
111 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
108 color: fontColor
112 color: fontColor
109 }
113 }
qml/Dash/Previews/PreviewActions.qml+1−1
@@ -24,7 +24,7 @@ import QtQuick 2.1
24PreviewWidget {
24PreviewWidget {
25 id: root
25 id: root
26
26
27− height: row.height
27+ height: row.height + units.gu(1)
28
28
29 Row {
29 Row {
30 id: row
30 id: row
qml/Dash/Previews/PreviewHeader.qml+3−1
@@ -34,5 +34,7 @@ PreviewWidget {
34 title: root.widgetData["title"] || ""
34 title: root.widgetData["title"] || ""
35 subtitle: root.widgetData["subtitle"] || ""
35 subtitle: root.widgetData["subtitle"] || ""
36 width: parent.width
36 width: parent.width
37+
38+ titleSize: "large"
37 }
39 }
38−}
40+}
qml/Dash/Previews/PreviewTextSummary.qml+2−1
@@ -58,7 +58,8 @@ PreviewWidget {
58 }
58 }
59 height: (!seeMore.visible || seeMore.more) ? contentHeight : contentHeight / lineCount * (maximumCollapsedLineCount - 2)
59 height: (!seeMore.visible || seeMore.more) ? contentHeight : contentHeight / lineCount * (maximumCollapsedLineCount - 2)
60 clip: true
60 clip: true
61− fontSize: "medium"
61+ fontSize: "small"
62+ lineHeight: 1.2
62 color: Theme.palette.selected.backgroundText
63 color: Theme.palette.selected.backgroundText
63 opacity: .8
64 opacity: .8
64 text: widgetData["text"]
65 text: widgetData["text"]