mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-04 02:34:45 +00:00
use again 2 lines of text
This commit is contained in:
parent
0d3ad6fd2e
commit
58510d211d
2 changed files with 4 additions and 16 deletions
|
|
@ -128,6 +128,8 @@ ContainmentLayoutManager.ItemContainer {
|
||||||
visible: text.length > 0
|
visible: text.length > 0
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: root.reservedSpaceForLabel
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
Layout.leftMargin: -parent.anchors.leftMargin
|
Layout.leftMargin: -parent.anchors.leftMargin
|
||||||
Layout.rightMargin: -parent.anchors.rightMargin
|
Layout.rightMargin: -parent.anchors.rightMargin
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
@ -135,21 +137,7 @@ ContainmentLayoutManager.ItemContainer {
|
||||||
maximumLineCount: 2
|
maximumLineCount: 2
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
|
||||||
text: {
|
text: model.ApplicationNameRole
|
||||||
var pieces = model.ApplicationNameRole.split(" ");
|
|
||||||
var word = "";
|
|
||||||
var nextWord = "";
|
|
||||||
var i = 0;
|
|
||||||
while (nextWord.length < 15) {
|
|
||||||
word += " " + pieces[i++];
|
|
||||||
if (i < pieces.length) {
|
|
||||||
nextWord = word + " " + pieces[i];
|
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return word;
|
|
||||||
}
|
|
||||||
//FIXME: export smallestReadableFont
|
//FIXME: export smallestReadableFont
|
||||||
font.pixelSize: theme.defaultFont.pixelSize * 0.9
|
font.pixelSize: theme.defaultFont.pixelSize * 0.9
|
||||||
color: model.ApplicationLocationRole == ApplicationListModel.Desktop ? "white" : theme.textColor
|
color: model.ApplicationLocationRole == ApplicationListModel.Desktop ? "white" : theme.textColor
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ Item {
|
||||||
|
|
||||||
Controls.Label {
|
Controls.Label {
|
||||||
id: metrics
|
id: metrics
|
||||||
text: "M"
|
text: "M\nM"
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue