mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
88 files reformatted — zero logic changes: - All views, components, and JS modules wrapped to 80-char margin - Long property bindings, ternaries, and strings broken at natural points - Theme.qml theme definitions expanded to multi-line - StyleVariables tokens wrapped - Section comment rulers trimmed to 80 chars Trade-off: LOC increases from line wrapping (compact single-line properties now span 2-3 lines). Content unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
97 lines
3.2 KiB
QML
97 lines
3.2 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import QmlComponents 1.0
|
|
|
|
CCard {
|
|
id: radiusEditor
|
|
Layout.fillWidth: true
|
|
property int radiusSmall: 4
|
|
property int radiusMedium: 8
|
|
property int radiusLarge: 16
|
|
signal radiusSmallEdited(int value)
|
|
signal radiusMediumEdited(int value)
|
|
signal radiusLargeEdited(int value)
|
|
|
|
ColumnLayout {
|
|
anchors.fill: parent; anchors.margins: 20
|
|
spacing: 16
|
|
|
|
CText { variant: "h4"; text: "Border Radius" }
|
|
CText {
|
|
variant: "caption"
|
|
text: "Control corner rounding for"
|
|
+ " small, medium, and large"
|
|
+ " elements"
|
|
}
|
|
CDivider { Layout.fillWidth: true }
|
|
|
|
RowLayout {
|
|
Layout.fillWidth: true; spacing: 16
|
|
CTextField {
|
|
Layout.preferredWidth: 100; label: "Small (px)"
|
|
placeholderText: "4"; text: radiusSmall.toString()
|
|
onTextChanged: {
|
|
var val = parseInt(text)
|
|
if (!isNaN(val) && val >= 0)
|
|
radiusEditor
|
|
.radiusSmallEdited(val)
|
|
}
|
|
}
|
|
CTextField {
|
|
Layout.preferredWidth: 100
|
|
label: "Medium (px)"
|
|
placeholderText: "8"
|
|
text: radiusMedium.toString()
|
|
onTextChanged: {
|
|
var val = parseInt(text)
|
|
if (!isNaN(val) && val >= 0)
|
|
radiusEditor
|
|
.radiusMediumEdited(val)
|
|
}
|
|
}
|
|
CTextField {
|
|
Layout.preferredWidth: 100
|
|
label: "Large (px)"
|
|
placeholderText: "16"
|
|
text: radiusLarge.toString()
|
|
onTextChanged: {
|
|
var val = parseInt(text)
|
|
if (!isNaN(val) && val >= 0)
|
|
radiusEditor
|
|
.radiusLargeEdited(val)
|
|
}
|
|
}
|
|
Item { Layout.fillWidth: true }
|
|
RowLayout {
|
|
spacing: 16
|
|
Repeater {
|
|
model: [
|
|
{ label: "Sm", r: radiusSmall },
|
|
{ label: "Md", r: radiusMedium },
|
|
{ label: "Lg", r: radiusLarge }
|
|
]
|
|
ColumnLayout {
|
|
spacing: 4
|
|
Rectangle {
|
|
width: 48; height: 48; radius: modelData.r
|
|
color: "transparent"
|
|
border.width: 2
|
|
border.color: Theme.primary
|
|
}
|
|
Text {
|
|
text: modelData.label
|
|
+ " (" + modelData.r
|
|
+ "px)"
|
|
font.pixelSize: 10
|
|
color: Theme.textSecondary
|
|
horizontalAlignment:
|
|
Text.AlignHCenter
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|