Fix: TextEdit anchors.top: headerBar/bottom + anchors.bottom: parent.bottom (без Flickable — Flickable получал нулевую высоту); убран debug yellow rectangle

This commit is contained in:
Flora (opencode)
2026-08-17 19:41:26 +03:00
parent 84cbe55d32
commit d709724fed
2 changed files with 13 additions and 46 deletions
+13 -29
View File
@@ -60,38 +60,22 @@ Item {
}
}
// Текст файла — TextEdit внутри Flickable
Flickable {
id: flickable
anchors.top: parent.top
// Текст файла — TextEdit напрямую (без Flickable)
TextEdit {
id: textDisplay
anchors.top: headerBar.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
contentWidth: textDisplay.paintedWidth
contentHeight: textDisplay.paintedHeight
clip: true
flickableDirection: Flickable.VerticalFlick
// ВРЕМЕННЫЙ красный фон для отладки размеров
Rectangle {
anchors.fill: parent
color: "red"
z: -1
}
TextEdit {
id: textDisplay
width: flickable.width
text: documentManager.activeIndex >= 0
? documentManager.contentAt(documentManager.activeIndex)
: ""
color: "black"
font.family: "Menlo, Consolas, 'DejaVu Sans Mono', monospace"
font.pixelSize: 14
wrapMode: TextEdit.NoWrap
readOnly: true
selectByMouse: true
}
text: documentManager.activeIndex >= 0
? documentManager.contentAt(documentManager.activeIndex)
: ""
color: "black"
font.family: "Menlo, Consolas, 'DejaVu Sans Mono', monospace"
font.pixelSize: 14
wrapMode: TextEdit.NoWrap
readOnly: true
selectByMouse: true
}
// Загрузка контента при смене файла