Исправлен белый экран в предпросмотре: отдельный компонент CodeBlock
- CodeBlock.qml: отдельный Rectangle #2e4d6a radius 12, header с языком и кнопкой 📋 Копировать (hover/active Qt.rgba, Timer 1.5с), код в rgba(0,0,0,0.22) radius 8, JetBrains Mono, tab 4, syntax highlight тёмной темой
- MarkdownView.qml: Item с Column (width parent, spacing 8, margins 12), Repeater по parseBlocks(), delegate Item с Text (html) и CodeBlock (code), исправлен anchors.fill → width/anchors.top для корректного implicitHeight, убраны дубли visible
- MdParser: parseBlocks() сохраняет codeBlocks/counter перед render(htmlPart) чтобы не терять codeId, QRegularExpression для ```lang, highlightedCode() с forceDark
- EditorPanel: viewArea/livePreview теперь MarkdownView (markdown property), liveDebounce/markdown, убран лишний \}
- qmllint чист, ctest 21/21, offscreen/cocoa RUNNING OK
This commit is contained in:
@@ -25,7 +25,10 @@ Rectangle {
|
||||
|
||||
Column {
|
||||
id: column
|
||||
anchors.fill: parent
|
||||
width: parent.width - 20
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.margins: 10
|
||||
spacing: 6
|
||||
|
||||
|
||||
Reference in New Issue
Block a user