on xenial help sign in
reorganize and account for horizontal with no art
affce2eAlbert Astals
qml/Dash/CardCreator.js+10−12
@@ -193,25 +193,23 @@ function createCardComponent(parent, template, components) {
193 }
193 }
194
194
195 var headerVerticalAnchors;
195 var headerVerticalAnchors;
196− if (isHorizontal) {
196+ if (inOverlay) {
197− headerVerticalAnchors = 'anchors.top: artShapeHolder.top; \
197+ headerVerticalAnchors = 'anchors.bottom: artShapeHolder.bottom; \
198− anchors.topMargin: units.gu(1);';
198+ anchors.bottomMargin: units.gu(1);';
199 } else {
199 } else {
200− if (inOverlay) {
201− headerVerticalAnchors = 'anchors.bottom: artShapeHolder.bottom; \
202− anchors.bottomMargin: units.gu(1);';
203− } else {
204− if (hasArt) {
200+ if (hasArt) {
201+ if (isHorizontal) {
205− headerVerticalAnchors = 'anchors.top: artShapeHolder.bottom; \
202+ headerVerticalAnchors = 'anchors.top: artShapeHolder.top; \
206 anchors.topMargin: units.gu(1);';
203 anchors.topMargin: units.gu(1);';
207 } else {
204 } else {
208− headerVerticalAnchors = 'anchors.top: parent.top; \
205+ headerVerticalAnchors = 'anchors.top: artShapeHolder.bottom; \
209 anchors.topMargin: units.gu(1);';
206 anchors.topMargin: units.gu(1);';
210− }
207+ } else {
208+ headerVerticalAnchors = 'anchors.top: parent.top; \
209+ anchors.topMargin: units.gu(1);';
211 }
210 }
212 }
211 }
213
212
214−
215 if (hasMascot) {
213 if (hasMascot) {
216 var useMascotShape = !hasBackground && !inOverlay;
214 var useMascotShape = !hasBackground && !inOverlay;
217 var anchors = "";
215 var anchors = "";