diff --git a/discover/qml/ReviewDelegate.qml b/discover/qml/ReviewDelegate.qml --- a/discover/qml/ReviewDelegate.qml +++ b/discover/qml/ReviewDelegate.qml @@ -30,12 +30,6 @@ property bool separator: true signal markUseful(bool useful) - function usefulnessToString(favorable, total) - { - return total===0 - ? i18n("Tell us about this review!") - : i18n("%1 out of %2 people found this review useful", favorable, total) - } Repeater { model: depth @@ -78,32 +72,43 @@ maximumLineCount: item.compact ? 3 : undefined wrapMode: Text.Wrap } - Label { + RowLayout { + Layout.fillWidth: true visible: !item.compact - text: item.usefulnessToString(usefulnessFavorable, usefulnessTotal) - } + opacity: 0.7 - Label { - visible: !item.compact - Layout.alignment: Qt.AlignRight - text: { - switch(usefulChoice) { - case ReviewsModel.Yes: - i18n("Useful? Yes/No") - break; - case ReviewsModel.No: - i18n("Useful? Yes/No") - break; - default: - i18n("Useful? Yes/No") - break; + Item { + Layout.fillWidth: true + } + + Label { + visible: usefulnessTotal !== 0 + text: i18n("%1 out of %2 people found this review useful", usefulnessFavorable, usefulnessTotal) + font.pointSize: theme.smallestFont.pointSize + } + + Label { + text: { + switch(usefulChoice) { + case ReviewsModel.Yes: + i18n("👍/👎") + break; + case ReviewsModel.No: + i18n("👍/👎") + break; + default: + i18n("👍/👎") + break; + } } + font.pointSize: theme.smallestFont.pointSize + onLinkActivated: item.markUseful(link=='true') } - onLinkActivated: item.markUseful(link=='true') - } - Kirigami.Separator { - visible: item.separator - Layout.fillWidth: true } } + + Kirigami.Separator { + visible: item.separator + Layout.fillWidth: true + } }