summaryrefslogtreecommitdiffstats
path: root/util/qt3d/modeltweak/qml/Widgets/ColorWidget.qml
diff options
context:
space:
mode:
Diffstat (limited to 'util/qt3d/modeltweak/qml/Widgets/ColorWidget.qml')
-rw-r--r--util/qt3d/modeltweak/qml/Widgets/ColorWidget.qml37
1 files changed, 37 insertions, 0 deletions
diff --git a/util/qt3d/modeltweak/qml/Widgets/ColorWidget.qml b/util/qt3d/modeltweak/qml/Widgets/ColorWidget.qml
new file mode 100644
index 00000000..f60ff1b0
--- /dev/null
+++ b/util/qt3d/modeltweak/qml/Widgets/ColorWidget.qml
@@ -0,0 +1,37 @@
+import QtQuick 1.0
+
+Item {
+ id: colorWidget
+ width: parent.width; height: 16
+
+ property variant targetColor
+ property alias text: flatText.text
+
+ Rectangle {
+ height: 2
+ anchors {
+ left: parent.left; right: flatSet.right
+ bottom: parent.bottom
+ rightMargin: flatSet.width/2
+ }
+ color: colorWidget.targetColor.color
+ }
+ Text {
+ id: flatText
+ anchors { top: parent.top; left: parent.left }
+ text:"Color"
+ color: "white"
+ }
+ BlenderToggle {
+ id: flatSet
+ width: 32
+ anchors { right: parent.right }
+ height: parent.height
+ buttonText: "Set"
+ radius: 6
+ onClicked: {
+ colorPicker.setTarget(colorWidget.targetColor);
+ colorPicker.visible = true
+ }
+ }
+}