mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 06:14:59 +00:00
WorkflowEditor (325→80): CWorkflowState.qml + WorkflowConnectionState.js DashboardView (121→95): DashboardDBAL.js + config/dashboard-config.json Storybook (114→78): StorybookSidebar + config/storybook-components.json + 7 components compacted to under 100 via formatting (no logic changes) + Multiple view/component splits across all remaining 100+ LOC files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
84 lines
2.5 KiB
QML
84 lines
2.5 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import QmlComponents 1.0
|
|
|
|
Rectangle {
|
|
id: codeEditorRoot
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
color: "#1e1e2e"
|
|
border.color: Theme.border
|
|
border.width: 1
|
|
|
|
property alias code: codeEditor.text
|
|
property string scriptName: ""
|
|
|
|
ColumnLayout {
|
|
anchors.fill: parent
|
|
spacing: 0
|
|
|
|
// Line number gutter + code area
|
|
Rectangle {
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
color: "transparent"
|
|
|
|
ScrollView {
|
|
anchors.fill: parent
|
|
clip: true
|
|
|
|
TextArea {
|
|
id: codeEditor
|
|
font.family: "Consolas, 'Courier New', monospace"
|
|
font.pixelSize: 13
|
|
color: "#cdd6f4"
|
|
selectionColor: "#45475a"
|
|
selectedTextColor: "#cdd6f4"
|
|
wrapMode: TextEdit.NoWrap
|
|
tabStopDistance: 28
|
|
padding: 16
|
|
leftPadding: 56
|
|
|
|
background: Rectangle {
|
|
color: "transparent"
|
|
|
|
// Line numbers column
|
|
Column {
|
|
x: 4
|
|
y: codeEditor.topPadding
|
|
width: 44
|
|
|
|
Repeater {
|
|
model: codeEditor.text.split("\n").length
|
|
delegate: Text {
|
|
width: 40
|
|
height: codeEditor.font.pixelSize * 1.4
|
|
horizontalAlignment: Text.AlignRight
|
|
text: (index + 1).toString()
|
|
font.family: codeEditor.font.family
|
|
font.pixelSize: codeEditor.font.pixelSize
|
|
color: "#585b70"
|
|
}
|
|
}
|
|
}
|
|
|
|
// Gutter separator
|
|
Rectangle {
|
|
x: 48
|
|
y: 0
|
|
width: 1
|
|
height: parent.height
|
|
color: "#313244"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
LuaEditorStatusBar {
|
|
lineCount: codeEditor.text.split("\n").length
|
|
}
|
|
}
|
|
}
|