From 9a2d2269c0c49b981b90c6b3e96e3dcb4022c5d8 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 17 Oct 2019 11:40:25 +0200 Subject: [PATCH] try to avoid ... on launchers --- .../package/contents/ui/launcher/Delegate.qml | 19 ++++++++++++++----- .../ui/launcher/LauncherContainer.qml | 1 + 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/containments/homescreen/package/contents/ui/launcher/Delegate.qml b/containments/homescreen/package/contents/ui/launcher/Delegate.qml index 18bbf8e7..c275cf35 100644 --- a/containments/homescreen/package/contents/ui/launcher/Delegate.qml +++ b/containments/homescreen/package/contents/ui/launcher/Delegate.qml @@ -129,17 +129,26 @@ ContainmentLayoutManager.ItemContainer { Layout.fillWidth: true Layout.preferredHeight: root.reservedSpaceForLabel + height: root.reservedSpaceForLabel wrapMode: Text.WordWrap - Layout.leftMargin: -parent.anchors.leftMargin - Layout.rightMargin: -parent.anchors.rightMargin + Layout.leftMargin: -parent.anchors.leftMargin + units.smallSpacing + Layout.rightMargin: -parent.anchors.rightMargin + units.smallSpacing horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignTop maximumLineCount: 2 - elide: Text.ElideRight + //elide: Text.ElideRight + elide: truncated ? Text.ElideLeft : Text.ElideRight - text: model.ApplicationNameRole + text: { + // This trick can get us a shorter text but without ... + if (truncated) { + return model.ApplicationNameRole + "\x9C" + } else { + return model.ApplicationNameRole; + } + } //FIXME: export smallestReadableFont - font.pixelSize: theme.defaultFont.pixelSize * 0.9 + font.pointSize: theme.defaultFont.pointSize * 0.9 color: model.ApplicationLocationRole == ApplicationListModel.Desktop ? "white" : theme.textColor layer.enabled: model.ApplicationLocationRole == ApplicationListModel.Desktop diff --git a/containments/homescreen/package/contents/ui/launcher/LauncherContainer.qml b/containments/homescreen/package/contents/ui/launcher/LauncherContainer.qml index b484080f..17d14fe0 100644 --- a/containments/homescreen/package/contents/ui/launcher/LauncherContainer.qml +++ b/containments/homescreen/package/contents/ui/launcher/LauncherContainer.qml @@ -47,6 +47,7 @@ Item { id: metrics text: "M\nM" visible: false + font.pointSize: theme.defaultFont.pointSize * 0.9 } Item {