From dbb32a37779474a3051701adb7d21de077077620 Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Mon, 10 Sep 2018 14:58:33 +0300 Subject: [PATCH] Truncate text if too big --- slice/LoopListPowerItem.qml | 2 ++ slice/LoopListUserItem.qml | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/slice/LoopListPowerItem.qml b/slice/LoopListPowerItem.qml index 54d3a83..8354b0b 100644 --- a/slice/LoopListPowerItem.qml +++ b/slice/LoopListPowerItem.qml @@ -59,8 +59,10 @@ Item id: descriptionLabel text: itemRoot.title color: ( hover ? colors.textHover : colors.text ) + width: parent.width - descriptionLabel.height + 10 - 2 - 24 font: fonts.listItemMed + elide: Text.ElideRight x: descriptionLabel.height + 10 + 12 y: 5 diff --git a/slice/LoopListUserItem.qml b/slice/LoopListUserItem.qml index 32375f9..319f05f 100644 --- a/slice/LoopListUserItem.qml +++ b/slice/LoopListUserItem.qml @@ -50,8 +50,12 @@ Item font: fonts.listItemMed + elide: Text.ElideRight + x: itemRoot.height + 12 y: 0 + + width: itemRoot.width - itemRoot.height - 26 } Text @@ -62,6 +66,10 @@ Item y: userName == "" ? 7 : userNameText.height * 0.8 font: userName == "" ? fonts.listItemBig : fonts.listItemSub x: itemRoot.height + 12 + + elide: Text.ElideRight + + width: itemRoot.width - itemRoot.height - 26 } Rectangle