on xenial help sign in
Fix right padding and tests
2620862Andrea Cimitan
plugins/Dash/CardCreator.js+2
@@ -467,6 +467,8 @@ function cardString(template, components) {
467 if (!touchdownOnArtShape) {
467 if (!touchdownOnArtShape) {
468 extraRightAnchor = 'rightMargin: units.gu(1); \n';
468 extraRightAnchor = 'rightMargin: units.gu(1); \n';
469 extraLeftAnchor = 'leftMargin: units.gu(1); \n';
469 extraLeftAnchor = 'leftMargin: units.gu(1); \n';
470+ } else if (headerAsOverlay && !hasEmblem) {
471+ extraRightAnchor = 'rightMargin: units.gu(1); \n';
470 }
472 }
471
473
472 if (hasMascot) {
474 if (hasMascot) {
tests/plugins/Dash/cardcreator/5.res+2
@@ -103,6 +103,7 @@ Label {
103 id: titleLabel;
103 id: titleLabel;
104 objectName: "titleLabel";
104 objectName: "titleLabel";
105 anchors { right: parent.right;
105 anchors { right: parent.right;
106+ rightMargin: units.gu(1);
106 left: parent.left;
107 left: parent.left;
107 leftMargin: units.gu(1);
108 leftMargin: units.gu(1);
108 top: overlayLoader.top;
109 top: overlayLoader.top;
@@ -124,6 +125,7 @@ Label {
124 objectName: "subtitleLabel";
125 objectName: "subtitleLabel";
125 anchors { left: titleLabel.left;
126 anchors { left: titleLabel.left;
126 leftMargin: titleLabel.leftMargin;
127 leftMargin: titleLabel.leftMargin;
128+ rightMargin: units.gu(1);
127 right: titleLabel.right;
129 right: titleLabel.right;
128 top: titleLabel.bottom;
130 top: titleLabel.bottom;
129 }
131 }
tests/qmltests/Dash/tst_Card.qml+1−1
@@ -99,7 +99,7 @@ Rectangle {
99 {
99 {
100 "name": "Art, title - overlaid",
100 "name": "Art, title - overlaid",
101 "layout": { "template": { "overlay": true },
101 "layout": { "template": { "overlay": true },
102− "components": { "art": "art", "summary": "summary" } }
102+ "components": { "art": "art", "title": "title" } }
103 },
103 },
104 ]
104 ]
105
105