panels/PreviewPanel.qml declares the "No file selected" EmptyState inside the content Column. EmptyState positions itself with anchors.centerIn, and an anchored child inside a positioner doesn't just misplace itself — Qt logs
QML Column: Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column. Column will not function.
and the Column permanently stops laying out its children. Once the empty state has been visible even once, every later text preview renders its Flickable at y:0, painting the file's first line on top of the filename header (reproduced headless with a plain qml runner: navigate so the panel shows "No file selected", then preview any text file):
- title row shows the filename and the file's first heading overlapped/garbled,
- the header separator is swallowed,
- the body is shifted up by title+separator height.
Fix is minimal: move the EmptyState out of the Column (sibling of it, centerOn the column). Working commit on my fork, applies cleanly here: nocstah@8b443fe
Two related notes from the same investigation:
- Same bug class in
dialogs/CommandPalettePanel.qml:53 — the palette's Column logs the same "Column will not function" warning on every launch (hundreds of occurrences in a few days of journal on my machine). I haven't chased its visible symptom, but the layout is in the same undefined state.
- While fixing the preview I also found
loadPreview()'s directory branch never clears previewIsText, so the previous file's text stays ghosted behind the third-column directory listing; same fork commit fixes that too.
panels/PreviewPanel.qmldeclares the "No file selected"EmptyStateinside the contentColumn.EmptyStatepositions itself withanchors.centerIn, and an anchored child inside a positioner doesn't just misplace itself — Qt logsand the Column permanently stops laying out its children. Once the empty state has been visible even once, every later text preview renders its Flickable at y:0, painting the file's first line on top of the filename header (reproduced headless with a plain
qmlrunner: navigate so the panel shows "No file selected", then preview any text file):Fix is minimal: move the
EmptyStateout of theColumn(sibling of it,centerOnthe column). Working commit on my fork, applies cleanly here: nocstah@8b443feTwo related notes from the same investigation:
dialogs/CommandPalettePanel.qml:53— the palette's Column logs the same "Column will not function" warning on every launch (hundreds of occurrences in a few days of journal on my machine). I haven't chased its visible symptom, but the layout is in the same undefined state.loadPreview()'s directory branch never clearspreviewIsText, so the previous file's text stays ghosted behind the third-column directory listing; same fork commit fixes that too.