forked from qt-creator/qt-creator
* Add QML Window based popover to StudioControls * Add color editor to StudioControls * Move color editor modules to StudioControls * Move IconIndicator to StudioControls * Move ToolTipArea to StudioControls * Add color backend to qmldesignerbase to allow control value binding * Use popover in connections editor * Add window manager to send focus changes to QML Windows * Update ColorEditor UX * Remove HelperWindow workaround for GradientPresetList (Qt 5 vs 6) * Fix eye dropper for QWindow Task-number: QDS-10926 Change-Id: Ia87b30543affde88faaef2ebdf120cb5d348c935 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
80 lines
2.1 KiB
QML
80 lines
2.1 KiB
QML
// Copyright (C) 2023 The Qt Company Ltd.
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
|
|
|
import QtQuick
|
|
import QtQuick.Controls
|
|
import StudioControls as StudioControls
|
|
import StudioTheme as StudioTheme
|
|
|
|
Column {
|
|
id: root
|
|
|
|
readonly property real horizontalSpacing: 10
|
|
readonly property real verticalSpacing: 12
|
|
readonly property real columnWidth: (root.width - root.horizontalSpacing) / 2
|
|
|
|
property var backend
|
|
|
|
width: parent.width
|
|
spacing: root.verticalSpacing
|
|
|
|
PopupLabel {
|
|
text: qsTr("Type")
|
|
tooltip: qsTr("Sets the category of the <b>Local Custom Property</b>.")
|
|
}
|
|
|
|
StudioControls.TopLevelComboBox {
|
|
id: type
|
|
style: StudioTheme.Values.connectionPopupControlStyle
|
|
width: root.columnWidth
|
|
|
|
model: backend.type.model ?? []
|
|
onActivated: backend.type.activateIndex(type.currentIndex)
|
|
property int currentTypeIndex: backend.type.currentIndex ?? 0
|
|
onCurrentTypeIndexChanged: type.currentIndex = type.currentTypeIndex
|
|
}
|
|
|
|
Row {
|
|
spacing: root.horizontalSpacing
|
|
|
|
PopupLabel {
|
|
width: root.columnWidth
|
|
text: qsTr("Name")
|
|
tooltip: qsTr("Sets a name for the <b>Local Custom Property</b>.")
|
|
}
|
|
|
|
PopupLabel {
|
|
width: root.columnWidth
|
|
text: qsTr("Value")
|
|
tooltip: qsTr("Sets a valid <b>Local Custom Property</b> value.")
|
|
}
|
|
}
|
|
|
|
Row {
|
|
spacing: root.horizontalSpacing
|
|
|
|
StudioControls.TextField {
|
|
id: name
|
|
|
|
width: root.columnWidth
|
|
actionIndicatorVisible: false
|
|
translationIndicatorVisible: false
|
|
|
|
text: backend.name.text ?? ""
|
|
onEditingFinished: backend.name.activateText(name.text)
|
|
}
|
|
|
|
StudioControls.TextField {
|
|
id: value
|
|
|
|
width: root.columnWidth
|
|
actionIndicatorVisible: false
|
|
translationIndicatorVisible: false
|
|
|
|
|
|
text: backend.value.text ?? ""
|
|
onEditingFinished: backend.value.activateText(value.text)
|
|
}
|
|
}
|
|
}
|