Qml/Main: add maximun text lines, tooltip for truncated mod names

This commit is contained in:
Toast 2025-06-05 14:09:38 +02:00
parent b4743432c2
commit 8494196ad7

View file

@ -75,6 +75,19 @@ Kirigami.ApplicationWindow {
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
}
}
Kirigami.Separator {
Layout.fillWidth: true
@ -86,6 +99,9 @@ Kirigami.ApplicationWindow {
font.italic: desc ? false : true
text: desc ? desc : "No description available"
wrapMode: Text.WordWrap
maximumLineCount: 6
elide: Text.ElideRight
}
}
ColumnLayout {