QmlDesigner: Add UX approved gradient background to 3D edit view

Change-Id: I18b976324f57cf559a43d9ff239796cf25b3cb2f
Fixes: QDS-1202
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Miikka Heikkinen
2019-11-25 15:11:34 +02:00
parent 901b6b0237
commit f9c1795d3b

View File

@@ -174,11 +174,14 @@ Window {
} }
Rectangle { Rectangle {
id: sceneBg
color: "#FFFFFF"
anchors.fill: parent anchors.fill: parent
focus: true focus: true
gradient: Gradient {
GradientStop { position: 1.0; color: "#222222" }
GradientStop { position: 0.0; color: "#999999" }
}
TapHandler { // check tapping/clicking an object in the scene TapHandler { // check tapping/clicking an object in the scene
onTapped: { onTapped: {
var pickResult = editView.pick(eventPoint.scenePosition.x, var pickResult = editView.pick(eventPoint.scenePosition.x,
@@ -397,31 +400,45 @@ Window {
selectedNode : viewWindow.selectedNode ? selectionBox.model : null selectedNode : viewWindow.selectedNode ? selectionBox.model : null
} }
Column { Item {
anchors.left: parent.left anchors.left: parent.left
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
CheckBox { width: 200
id: editLightCheckbox height: 120
checked: false
text: qsTr("Use Edit View Light") Rectangle {
anchors.fill: parent
color: "white"
opacity: 0.3
} }
CheckBox { Column {
id: usePerspectiveCheckbox anchors.left: parent.left
checked: true anchors.bottom: parent.bottom
text: qsTr("Use Perspective Projection") CheckBox {
onCheckedChanged: _generalHelper.requestOverlayUpdate() id: editLightCheckbox
} checked: false
text: qsTr("Use Edit View Light")
}
CheckBox { CheckBox {
id: globalControl id: usePerspectiveCheckbox
checked: true checked: true
text: qsTr("Use Global Orientation") text: qsTr("Use Perspective Projection")
onCheckedChanged: _generalHelper.requestOverlayUpdate()
}
CheckBox {
id: globalControl
checked: true
text: qsTr("Use Global Orientation")
}
} }
} }
Text { Text {
id: helpText id: helpText
color: "white"
text: qsTr("Camera controls: ALT + mouse press and drag. Left: Rotate, Middle: Pan, Right/Wheel: Zoom.") text: qsTr("Camera controls: ALT + mouse press and drag. Left: Rotate, Middle: Pan, Right/Wheel: Zoom.")
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
} }