on xenial help sign in
Add maximumLineCount for subtitle label in cards Fixes: #1414870
286d082Andrea Cimitan
plugins/Dash/CardCreator.js+1
@@ -258,6 +258,7 @@ var kSubtitleLabelCode = 'Label { \n\
258 anchors { %1 } \n\
258 anchors { %1 } \n\
259 anchors.topMargin: units.dp(2); \n\
259 anchors.topMargin: units.dp(2); \n\
260 elide: Text.ElideRight; \n\
260 elide: Text.ElideRight; \n\
261+ maximumLineCount: 1; \n\
261 fontSize: "x-small"; \n\
262 fontSize: "x-small"; \n\
262 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); \n\
263 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); \n\
263 color: %2; \n\
264 color: %2; \n\
tests/plugins/Dash/cardcreator/2.res+1
@@ -109,6 +109,7 @@ CroppedImageMinimumSourceSize {
109 }
109 }
110 anchors.topMargin: units.dp(2);
110 anchors.topMargin: units.dp(2);
111 elide: Text.ElideRight;
111 elide: Text.ElideRight;
112+ maximumLineCount: 1;
112 fontSize: "x-small";
113 fontSize: "x-small";
113 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
114 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
114 color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
115 color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
tests/plugins/Dash/cardcreator/3.res+1
@@ -89,6 +89,7 @@ Label {
89 }
89 }
90 anchors.topMargin: units.dp(2);
90 anchors.topMargin: units.dp(2);
91 elide: Text.ElideRight;
91 elide: Text.ElideRight;
92+ maximumLineCount: 1;
92 fontSize: "x-small";
93 fontSize: "x-small";
93 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
94 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
94 color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
95 color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
tests/plugins/Dash/cardcreator/4.res+1
@@ -89,6 +89,7 @@ Label {
89 }
89 }
90 anchors.topMargin: units.dp(2);
90 anchors.topMargin: units.dp(2);
91 elide: Text.ElideRight;
91 elide: Text.ElideRight;
92+ maximumLineCount: 1;
92 fontSize: "x-small";
93 fontSize: "x-small";
93 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
94 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
94 color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
95 color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
tests/plugins/Dash/cardcreator/5.res+1
@@ -134,6 +134,7 @@ Label {
134 }
134 }
135 anchors.topMargin: units.dp(2);
135 anchors.topMargin: units.dp(2);
136 elide: Text.ElideRight;
136 elide: Text.ElideRight;
137+ maximumLineCount: 1;
137 fontSize: "x-small";
138 fontSize: "x-small";
138 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
139 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
139 color: root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
140 color: root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
tests/plugins/Dash/cardcreator/6.res+1
@@ -88,6 +88,7 @@ Item {
88 }
88 }
89 anchors.topMargin: units.dp(2);
89 anchors.topMargin: units.dp(2);
90 elide: Text.ElideRight;
90 elide: Text.ElideRight;
91+ maximumLineCount: 1;
91 fontSize: "x-small";
92 fontSize: "x-small";
92 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
93 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
93 color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
94 color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
tests/plugins/Dash/cardcreator/7.res+1
@@ -110,6 +110,7 @@ CroppedImageMinimumSourceSize {
110 }
110 }
111 anchors.topMargin: units.dp(2);
111 anchors.topMargin: units.dp(2);
112 elide: Text.ElideRight;
112 elide: Text.ElideRight;
113+ maximumLineCount: 1;
113 fontSize: "x-small";
114 fontSize: "x-small";
114 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
115 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
115 color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
116 color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");