Wrap and space the empty-state placeholder in main pane

The centered placeholder ("Select a document" / "Not connected: ...")
had no width constraint, so long text rendered as a single over-wide,
cramped line. Constrain its width, center-align, enable word wrap, and
set lineHeight 1.3 so the message breathes.
This commit is contained in:
Levi Neely 2026-10-06 12:52:59 +02:00
parent e418177bad
commit 42f8aaa62c
1 changed files with 5 additions and 0 deletions

View File

@ -246,12 +246,17 @@ ApplicationWindow {
Label {
anchors.centerIn: parent
width: Math.min(parent.width - root.baseFontSize * 4,
root.baseFontSize * 30)
visible: root.currentDoc === ""
text: orkClient.connected
? qsTr("Select a document")
: qsTr("Not connected: %1").arg(orkClient.error)
color: theme.placeholderTextColor
font.pointSize: root.baseFontSize + 1
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
lineHeight: 1.3
}
}
}