WIP: Add word wrap #22

Draft
Toast wants to merge 3 commits from wordWrap into main
Showing only changes of commit 8494196ad7 - Show all commits

View file

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