diff --git a/src/leek/qml/Main.qml b/src/leek/qml/Main.qml index 9b6b912..667eb01 100644 --- a/src/leek/qml/Main.qml +++ b/src/leek/qml/Main.qml @@ -35,6 +35,7 @@ Kirigami.ApplicationWindow { component ModCardDelegate: Kirigami.AbstractCard { required property QMod mod + id: card showClickFeedback: true onClicked: pageStack.push(Qt.resolvedUrl("ModPage.qml"), { mod: mod @@ -74,6 +75,25 @@ Kirigami.ApplicationWindow { Layout.fillWidth: true text: mod.name type: Kirigami.Heading.Type.Primary + wrapMode: Text.WordWrap + maximumLineCount: 2 + elide: Text.ElideRight + + // https://stackoverflow.com/a/50504960 + Controls.ToolTip.visible: labelArea.containsMouse && truncated + Controls.ToolTip.text: mod.name + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay + + MouseArea { + id: labelArea + anchors.fill: parent + hoverEnabled: true + // For some reason I can't connect the pressed signals, so there's no feedback for that + // Whoops + Component.onCompleted: { + clicked.connect(card.clicked) + } + } } Kirigami.Separator { Layout.fillWidth: true @@ -85,6 +105,9 @@ Kirigami.ApplicationWindow { font.italic: desc ? false : true text: desc ? desc : "No description available" wrapMode: Text.WordWrap + + maximumLineCount: 6 + elide: Text.ElideRight } } ColumnLayout {