on xenial help sign in
Always use fixedHeaderHeight for the non card tool cards
commit411816428c99b694a4538fdaefda58476729aec0 authorAlbert Astals Cid <albert.astals@canonical.com> dateTue 16 Feb 2016, 15:22 (11 years ago) parent149cc79
9 files changed+11−11
plugins/Dash/CardCreator.js+3−3 tests/plugins/Dash/cardcreator/10.res+1−1 tests/plugins/Dash/cardcreator/11.res+1−1 tests/plugins/Dash/cardcreator/2.res+1−1 tests/plugins/Dash/cardcreator/4.res+1−1 tests/plugins/Dash/cardcreator/5.res+1−1 tests/plugins/Dash/cardcreator/7.res+1−1 tests/plugins/Dash/cardcreator/8.res+1−1 tests/plugins/Dash/cardcreator/9.res+1−1
plugins/Dash/CardCreator.js+3−3
@@ -228,7 +228,7 @@ function kHeaderRowCodeGenerator() {
228228 var isCardTool = args.shift();
229229 var heightCode;
230230 if (!isCardTool) {
231− heightCode = "height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight; \n";
231+ heightCode = "height: root.fixedHeaderHeight; \n";
232232 } else {
233233 heightCode = "";
234234 }
@@ -542,7 +542,7 @@ function cardString(template, components, isCardTool) {
542542 if (isCardTool) {
543543 headerHeightCode = "headerHeight";
544544 } else {
545− headerHeightCode = "(fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight)";
545+ headerHeightCode = "root.fixedHeaderHeight";
546546 }
547547 code += kOverlayLoaderCode.arg(asynchronous).arg(headerHeightCode);
548548 }
@@ -817,7 +817,7 @@ function cardString(template, components, isCardTool) {
817817 if (isCardTool) {
818818 audioButtonHeight = 'headerHeight + 2 * units.gu(1)';
819819 } else {
820− audioButtonHeight = '(root.fixedHeaderHeight > 0 ? root.fixedHeaderHeight : headerHeight) + 2 * units.gu(1)';
820+ audioButtonHeight = 'root.fixedHeaderHeight + 2 * units.gu(1)';
821821 }
822822 }
823823 code += kAudioButtonCode.arg(audioButtonAnchorsFill).arg(audioButtonWidth).arg(audioButtonHeight);
tests/plugins/Dash/cardcreator/10.res+1−1
@@ -58,7 +58,7 @@ Row {
5858 objectName: "outerRow";
5959 property real margins: units.gu(1);
6060 spacing: margins;
61− height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight;
61+ height: root.fixedHeaderHeight;
6262 anchors { top: parent.top;
6363 topMargin: units.gu(1);
6464left: parent.left;
tests/plugins/Dash/cardcreator/11.res+1−1
@@ -133,7 +133,7 @@ Row {
133133 objectName: "outerRow";
134134 property real margins: units.gu(1);
135135 spacing: margins;
136− height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight;
136+ height: root.fixedHeaderHeight;
137137 anchors { top: artShapeHolder.bottom;
138138 topMargin: units.gu(1);
139139left: parent.left;
tests/plugins/Dash/cardcreator/2.res+1−1
@@ -58,7 +58,7 @@ Row {
5858 objectName: "outerRow";
5959 property real margins: units.gu(1);
6060 spacing: margins;
61− height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight;
61+ height: root.fixedHeaderHeight;
6262 anchors { top: parent.top;
6363 topMargin: units.gu(1);
6464 left: parent.left;
tests/plugins/Dash/cardcreator/4.res+1−1
@@ -20,7 +20,7 @@ Row {
2020 objectName: "outerRow";
2121 property real margins: units.gu(1);
2222 spacing: margins;
23− height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight;
23+ height: root.fixedHeaderHeight;
2424 anchors { top: parent.top;
2525 topMargin: units.gu(1);
2626 left: parent.left;
tests/plugins/Dash/cardcreator/5.res+1−1
@@ -90,7 +90,7 @@ Item {
9090 }
9191Loader {
9292 id: overlayLoader;
93− readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
93+ readonly property real overlayHeight: root.fixedHeaderHeight + units.gu(2);
9494 anchors.fill: artShapeHolder;
9595 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
9696 asynchronous: true;
tests/plugins/Dash/cardcreator/7.res+1−1
@@ -58,7 +58,7 @@ Row {
5858 objectName: "outerRow";
5959 property real margins: units.gu(1);
6060 spacing: margins;
61− height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight;
61+ height: root.fixedHeaderHeight;
6262 anchors { top: parent.top;
6363 topMargin: units.gu(1);
6464 left: parent.left;
tests/plugins/Dash/cardcreator/8.res+1−1
@@ -58,7 +58,7 @@ Row {
5858 objectName: "outerRow";
5959 property real margins: units.gu(1);
6060 spacing: margins;
61− height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight;
61+ height: root.fixedHeaderHeight;
6262 anchors { top: parent.top;
6363 topMargin: units.gu(1);
6464left: parent.left;
tests/plugins/Dash/cardcreator/9.res+1−1
@@ -71,7 +71,7 @@ CardAudioProgress {
7171 id: audioButton;
7272 anchors.fill: undefined;
7373 width: height;
74− height: (root.fixedHeaderHeight > 0 ? root.fixedHeaderHeight : headerHeight) + 2 * units.gu(1);
74+ height: root.fixedHeaderHeight + 2 * units.gu(1);
7575 readonly property url source: (cardData["quickPreviewData"] && cardData["quickPreviewData"]["uri"]) || "";
7676 UbuntuShape {
7777 anchors.fill: parent;