Files
metabuilder/qml/MetaBuilder/ThemeColorField.qml
johndoe6345789 491c4cffed refactor(qt6): push for sub-100 LOC — JS modules, JSON configs, compact formatting
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>
2026-03-19 14:58:28 +00:00

45 lines
948 B
QML

import QtQuick
import QtQuick.Layouts
import QmlComponents 1.0
RowLayout {
id: root
Layout.fillWidth: true
spacing: 10
property string label: ""
property string colorValue: "#000000"
signal colorEdited(string val)
Rectangle {
width: 32
height: 32
radius: 6
color: root.colorValue
border.width: 1
border.color: Theme.border
Rectangle {
anchors.fill: parent
anchors.margins: 1
radius: 5
color: "transparent"
border.width: 1
border.color: Qt.darker(root.colorValue, 1.4)
z: -1
}
}
CTextField {
Layout.fillWidth: true
label: root.label
placeholderText: "#RRGGBB"
text: root.colorValue
onTextChanged: {
if (/^#[0-9a-fA-F]{6}$/.test(text)) {
root.colorEdited(text)
}
}
}
}