on xenial help sign in
Fixes
commit219e3b218f1f948fcb74720ec5094bdd7d729408 authorAndrea Cimitan <andrea.cimitan@gmail.com> dateFri 19 Sep 2014, 17:16 (12 years ago) parentbcb8670
8 files changed+16−16
plugins/Dash/CardCreator.js+2−2 tests/plugins/Dash/cardcreator/1.res+2−2 tests/plugins/Dash/cardcreator/2.res+2−2 tests/plugins/Dash/cardcreator/3.res+2−2 tests/plugins/Dash/cardcreator/4.res+2−2 tests/plugins/Dash/cardcreator/5.res+2−2 tests/plugins/Dash/cardcreator/6.res+2−2 tests/plugins/Dash/cardcreator/7.res+2−2
plugins/Dash/CardCreator.js+2−2
@@ -217,13 +217,13 @@ var kTitleLabelCode = 'Label { \n\
217217 elide: Text.ElideRight; \n\
218218 fontSize: "small"; \n\
219219 wrapMode: Text.Wrap; \n\
220− maximumLineCount: horizontalAlignment === Text.AlignHCenter ? 1 : 2; \n\
220+ maximumLineCount: 2; \n\
221221 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); \n\
222222 color: %2; \n\
223223 visible: showHeader %3; \n\
224224 text: root.title; \n\
225225 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal; \n\
226− horizontalAlignment: root.titleAlignment; \n\
226+ horizontalAlignment: lineCount === 2 ? Text.AlignLeft : root.titleAlignment; \n\
227227 }\n';
228228
229229// %1 is used as extra anchors of emblemIcon
tests/plugins/Dash/cardcreator/1.res+2−2
@@ -69,13 +69,13 @@ Label {
6969 elide: Text.ElideRight;
7070 fontSize: "small";
7171 wrapMode: Text.Wrap;
72− maximumLineCount: horizontalAlignment === Text.AlignHCenter ? 1 : 2;
72+ maximumLineCount: 2;
7373 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
7474 color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
7575 visible: showHeader ;
7676 text: root.title;
7777 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
78− horizontalAlignment: root.titleAlignment;
78+ horizontalAlignment: lineCount === 2 ? Text.AlignLeft : root.titleAlignment;
7979 }
8080UbuntuShape {
8181 id: touchdown;
tests/plugins/Dash/cardcreator/2.res+2−2
@@ -93,13 +93,13 @@ Image {
9393 elide: Text.ElideRight;
9494 fontSize: "small";
9595 wrapMode: Text.Wrap;
96− maximumLineCount: horizontalAlignment === Text.AlignHCenter ? 1 : 2;
96+ maximumLineCount: 2;
9797 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
9898 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");
9999 visible: showHeader ;
100100 text: root.title;
101101 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
102− horizontalAlignment: root.titleAlignment;
102+ horizontalAlignment: lineCount === 2 ? Text.AlignLeft : root.titleAlignment;
103103 }
104104 ,Label {
105105 id: subtitleLabel;
tests/plugins/Dash/cardcreator/3.res+2−2
@@ -69,13 +69,13 @@ Label {
6969 elide: Text.ElideRight;
7070 fontSize: "small";
7171 wrapMode: Text.Wrap;
72− maximumLineCount: horizontalAlignment === Text.AlignHCenter ? 1 : 2;
72+ maximumLineCount: 2;
7373 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
7474 color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
7575 visible: showHeader ;
7676 text: root.title;
7777 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
78− horizontalAlignment: root.titleAlignment;
78+ horizontalAlignment: lineCount === 2 ? Text.AlignLeft : root.titleAlignment;
7979 }
8080Label {
8181 id: subtitleLabel;
tests/plugins/Dash/cardcreator/4.res+2−2
@@ -73,13 +73,13 @@ Label {
7373 elide: Text.ElideRight;
7474 fontSize: "small";
7575 wrapMode: Text.Wrap;
76− maximumLineCount: horizontalAlignment === Text.AlignHCenter ? 1 : 2;
76+ maximumLineCount: 2;
7777 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
7878 color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
7979 visible: showHeader ;
8080 text: root.title;
8181 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
82− horizontalAlignment: root.titleAlignment;
82+ horizontalAlignment: lineCount === 2 ? Text.AlignLeft : root.titleAlignment;
8383 }
8484,Label {
8585 id: subtitleLabel;
tests/plugins/Dash/cardcreator/5.res+2−2
@@ -113,13 +113,13 @@ Label {
113113 elide: Text.ElideRight;
114114 fontSize: "small";
115115 wrapMode: Text.Wrap;
116− maximumLineCount: horizontalAlignment === Text.AlignHCenter ? 1 : 2;
116+ maximumLineCount: 2;
117117 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
118118 color: root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
119119 visible: showHeader && overlayLoader.active;
120120 text: root.title;
121121 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
122− horizontalAlignment: root.titleAlignment;
122+ horizontalAlignment: lineCount === 2 ? Text.AlignLeft : root.titleAlignment;
123123 }
124124Label {
125125 id: subtitleLabel;
tests/plugins/Dash/cardcreator/6.res+2−2
@@ -68,13 +68,13 @@ Item {
6868 elide: Text.ElideRight;
6969 fontSize: "small";
7070 wrapMode: Text.Wrap;
71− maximumLineCount: horizontalAlignment === Text.AlignHCenter ? 1 : 2;
71+ maximumLineCount: 2;
7272 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
7373 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");
7474 visible: showHeader ;
7575 text: root.title;
7676 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
77− horizontalAlignment: root.titleAlignment;
77+ horizontalAlignment: lineCount === 2 ? Text.AlignLeft : root.titleAlignment;
7878 }
7979,Label {
8080 id: subtitleLabel;
tests/plugins/Dash/cardcreator/7.res+2−2
@@ -94,13 +94,13 @@ Image {
9494 elide: Text.ElideRight;
9595 fontSize: "small";
9696 wrapMode: Text.Wrap;
97− maximumLineCount: horizontalAlignment === Text.AlignHCenter ? 1 : 2;
97+ maximumLineCount: 2;
9898 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
9999 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");
100100 visible: showHeader ;
101101 text: root.title;
102102 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
103− horizontalAlignment: root.titleAlignment;
103+ horizontalAlignment: lineCount === 2 ? Text.AlignLeft : root.titleAlignment;
104104 }
105105,Label {
106106 id: subtitleLabel;