on xenial help sign in
Always use fixedHeaderHeight for the non card tool cards
4118164Albert Astals Cid
plugins/Dash/CardCreator.js+3−3
@@ -228,7 +228,7 @@ function kHeaderRowCodeGenerator() {
228 var isCardTool = args.shift();
228 var isCardTool = args.shift();
229 var heightCode;
229 var heightCode;
230 if (!isCardTool) {
230 if (!isCardTool) {
231− heightCode = "height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight; \n";
231+ heightCode = "height: root.fixedHeaderHeight; \n";
232 } else {
232 } else {
233 heightCode = "";
233 heightCode = "";
234 }
234 }
@@ -542,7 +542,7 @@ function cardString(template, components, isCardTool) {
542 if (isCardTool) {
542 if (isCardTool) {
543 headerHeightCode = "headerHeight";
543 headerHeightCode = "headerHeight";
544 } else {
544 } else {
545− headerHeightCode = "(fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight)";
545+ headerHeightCode = "root.fixedHeaderHeight";
546 }
546 }
547 code += kOverlayLoaderCode.arg(asynchronous).arg(headerHeightCode);
547 code += kOverlayLoaderCode.arg(asynchronous).arg(headerHeightCode);
548 }
548 }
@@ -817,7 +817,7 @@ function cardString(template, components, isCardTool) {
817 if (isCardTool) {
817 if (isCardTool) {
818 audioButtonHeight = 'headerHeight + 2 * units.gu(1)';
818 audioButtonHeight = 'headerHeight + 2 * units.gu(1)';
819 } else {
819 } else {
820− audioButtonHeight = '(root.fixedHeaderHeight > 0 ? root.fixedHeaderHeight : headerHeight) + 2 * units.gu(1)';
820+ audioButtonHeight = 'root.fixedHeaderHeight + 2 * units.gu(1)';
821 }
821 }
822 }
822 }
823 code += kAudioButtonCode.arg(audioButtonAnchorsFill).arg(audioButtonWidth).arg(audioButtonHeight);
823 code += kAudioButtonCode.arg(audioButtonAnchorsFill).arg(audioButtonWidth).arg(audioButtonHeight);
tests/plugins/Dash/cardcreator/10.res+1−1
@@ -58,7 +58,7 @@ Row {
58 objectName: "outerRow";
58 objectName: "outerRow";
59 property real margins: units.gu(1);
59 property real margins: units.gu(1);
60 spacing: margins;
60 spacing: margins;
61− height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight;
61+ height: root.fixedHeaderHeight;
62 anchors { top: parent.top;
62 anchors { top: parent.top;
63 topMargin: units.gu(1);
63 topMargin: units.gu(1);
64left: parent.left;
64left: parent.left;
tests/plugins/Dash/cardcreator/11.res+1−1
@@ -133,7 +133,7 @@ Row {
133 objectName: "outerRow";
133 objectName: "outerRow";
134 property real margins: units.gu(1);
134 property real margins: units.gu(1);
135 spacing: margins;
135 spacing: margins;
136− height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight;
136+ height: root.fixedHeaderHeight;
137 anchors { top: artShapeHolder.bottom;
137 anchors { top: artShapeHolder.bottom;
138 topMargin: units.gu(1);
138 topMargin: units.gu(1);
139left: parent.left;
139left: parent.left;
tests/plugins/Dash/cardcreator/2.res+1−1
@@ -58,7 +58,7 @@ Row {
58 objectName: "outerRow";
58 objectName: "outerRow";
59 property real margins: units.gu(1);
59 property real margins: units.gu(1);
60 spacing: margins;
60 spacing: margins;
61− height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight;
61+ height: root.fixedHeaderHeight;
62 anchors { top: parent.top;
62 anchors { top: parent.top;
63 topMargin: units.gu(1);
63 topMargin: units.gu(1);
64 left: parent.left;
64 left: parent.left;
tests/plugins/Dash/cardcreator/4.res+1−1
@@ -20,7 +20,7 @@ Row {
20 objectName: "outerRow";
20 objectName: "outerRow";
21 property real margins: units.gu(1);
21 property real margins: units.gu(1);
22 spacing: margins;
22 spacing: margins;
23− height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight;
23+ height: root.fixedHeaderHeight;
24 anchors { top: parent.top;
24 anchors { top: parent.top;
25 topMargin: units.gu(1);
25 topMargin: units.gu(1);
26 left: parent.left;
26 left: parent.left;
tests/plugins/Dash/cardcreator/5.res+1−1
@@ -90,7 +90,7 @@ Item {
90 }
90 }
91Loader {
91Loader {
92 id: overlayLoader;
92 id: overlayLoader;
93− readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
93+ readonly property real overlayHeight: root.fixedHeaderHeight + units.gu(2);
94 anchors.fill: artShapeHolder;
94 anchors.fill: artShapeHolder;
95 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
95 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
96 asynchronous: true;
96 asynchronous: true;
tests/plugins/Dash/cardcreator/7.res+1−1
@@ -58,7 +58,7 @@ Row {
58 objectName: "outerRow";
58 objectName: "outerRow";
59 property real margins: units.gu(1);
59 property real margins: units.gu(1);
60 spacing: margins;
60 spacing: margins;
61− height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight;
61+ height: root.fixedHeaderHeight;
62 anchors { top: parent.top;
62 anchors { top: parent.top;
63 topMargin: units.gu(1);
63 topMargin: units.gu(1);
64 left: parent.left;
64 left: parent.left;
tests/plugins/Dash/cardcreator/8.res+1−1
@@ -58,7 +58,7 @@ Row {
58 objectName: "outerRow";
58 objectName: "outerRow";
59 property real margins: units.gu(1);
59 property real margins: units.gu(1);
60 spacing: margins;
60 spacing: margins;
61− height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight;
61+ height: root.fixedHeaderHeight;
62 anchors { top: parent.top;
62 anchors { top: parent.top;
63 topMargin: units.gu(1);
63 topMargin: units.gu(1);
64left: parent.left;
64left: parent.left;
tests/plugins/Dash/cardcreator/9.res+1−1
@@ -71,7 +71,7 @@ CardAudioProgress {
71 id: audioButton;
71 id: audioButton;
72 anchors.fill: undefined;
72 anchors.fill: undefined;
73 width: height;
73 width: height;
74− height: (root.fixedHeaderHeight > 0 ? root.fixedHeaderHeight : headerHeight) + 2 * units.gu(1);
74+ height: root.fixedHeaderHeight + 2 * units.gu(1);
75 readonly property url source: (cardData["quickPreviewData"] && cardData["quickPreviewData"]["uri"]) || "";
75 readonly property url source: (cardData["quickPreviewData"] && cardData["quickPreviewData"]["uri"]) || "";
76 UbuntuShape {
76 UbuntuShape {
77 anchors.fill: parent;
77 anchors.fill: parent;