From d709724fed962e7fffa913a8f673fd2dedaeacad Mon Sep 17 00:00:00 2001 From: "Flora (opencode)" Date: Mon, 17 Aug 2026 19:41:26 +0300 Subject: [PATCH] =?UTF-8?q?Fix:=20TextEdit=20anchors.top:=20headerBar/bott?= =?UTF-8?q?om=20+=20anchors.bottom:=20parent.bottom=20(=D0=B1=D0=B5=D0=B7?= =?UTF-8?q?=20Flickable=20=E2=80=94=20Flickable=20=D0=BF=D0=BE=D0=BB=D1=83?= =?UTF-8?q?=D1=87=D0=B0=D0=BB=20=D0=BD=D1=83=D0=BB=D0=B5=D0=B2=D1=83=D1=8E?= =?UTF-8?q?=20=D0=B2=D1=8B=D1=81=D0=BE=D1=82=D1=83);=20=D1=83=D0=B1=D1=80?= =?UTF-8?q?=D0=B0=D0=BD=20debug=20yellow=20rectangle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qml/panels/EditorPane.qml | 42 ++++++++++++-------------------------- qml/panels/EditorPanel.qml | 17 --------------- 2 files changed, 13 insertions(+), 46 deletions(-) diff --git a/qml/panels/EditorPane.qml b/qml/panels/EditorPane.qml index ac0b85a..02b28de 100644 --- a/qml/panels/EditorPane.qml +++ b/qml/panels/EditorPane.qml @@ -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 } // Загрузка контента при смене файла diff --git a/qml/panels/EditorPanel.qml b/qml/panels/EditorPanel.qml index c6c5cde..92f98c8 100644 --- a/qml/panels/EditorPanel.qml +++ b/qml/panels/EditorPanel.qml @@ -163,21 +163,4 @@ Item { const n = documentManager.openTabs.length if (n > 0) documentManager.setActiveIndex((documentManager.activeIndex + 1) % n) }} - - // ОТЛАДКА: видимый текст прямо в EditorPanel (z:1000) - Text { - z: 1000 - anchors.top: editorArea.top - anchors.left: editorArea.left - anchors.right: editorArea.right - height: 200 - text: documentManager.activeIndex >= 0 - ? "DEBUG CONTENT: " + documentManager.contentAt(documentManager.activeIndex).substring(0, 500) - : "NO FILE OPENED (activeIndex=" + documentManager.activeIndex + ")" - font.pixelSize: 16 - color: "blue" - wrapMode: Text.Wrap - clip: true - Rectangle { anchors.fill: parent; color: "yellow"; z: -1 } - } } \ No newline at end of file