on xenial help sign in
Fix 1393008
6fcee3cAndrea Cimitan
plugins/Dash/CardCreator.js+1−1
@@ -320,7 +320,7 @@ function cardString(template, components) {
320 var hasSummary = components["summary"] || false;
320 var hasSummary = components["summary"] || false;
321 var artAndSummary = hasArt && hasSummary;
321 var artAndSummary = hasArt && hasSummary;
322 var isHorizontal = template["card-layout"] === "horizontal";
322 var isHorizontal = template["card-layout"] === "horizontal";
323− var hasBackground = !isHorizontal && (template["card-background"] || components["background"] || artAndSummary);
323+ var hasBackground = (hasSummary || !isHorizontal) && (template["card-background"] || components["background"] || artAndSummary);
324 var hasTitle = components["title"] || false;
324 var hasTitle = components["title"] || false;
325 var hasMascot = components["mascot"] || false;
325 var hasMascot = components["mascot"] || false;
326 var hasEmblem = components["emblem"] && !(hasMascot && template["card-size"] === "small") || false;
326 var hasEmblem = components["emblem"] && !(hasMascot && template["card-size"] === "small") || false;
tests/qmltests/Dash/tst_Card.qml+2−2
@@ -61,7 +61,7 @@ Rectangle {
61 },
61 },
62 {
62 {
63 "name": "Art, header, summary - horizontal",
63 "name": "Art, header, summary - horizontal",
64− "layout": { "template": { "card-layout": "horizontal" },
64+ "layout": { "template": { "card-layout": "horizontal", "card-background": { "type": "gradient", "elements": ["grey", "white"] } },
65 "components": JSON.parse(Helpers.fullMapping) }
65 "components": JSON.parse(Helpers.fullMapping) }
66 },
66 },
67 {
67 {
@@ -407,7 +407,7 @@ Rectangle {
407 return [
407 return [
408 { tag: "Art and summary", visible: true, color: "#ffffff", index: 0 },
408 { tag: "Art and summary", visible: true, color: "#ffffff", index: 0 },
409 { tag: "No Summary", visible: false, index: 6 },
409 { tag: "No Summary", visible: false, index: 6 },
410− { tag: "Horizontal", visible: false, index: 5 },
410+ { tag: "Horizontal", visible: true, color: "#808080", index: 5 },
411 { tag: "Grey background", visible: true, color: "#808080", index: 10 },
411 { tag: "Grey background", visible: true, color: "#808080", index: 10 },
412 { tag: "Overriden Gradient background", visible: true, color: "#808080", gradientColor: "#ffffff",
412 { tag: "Overriden Gradient background", visible: true, color: "#808080", gradientColor: "#ffffff",
413 background: {type: "color", elements: ["grey", "white"]}, index: 10 },
413 background: {type: "color", elements: ["grey", "white"]}, index: 10 },