QmlDesigner: Edit 3D view icon update

Added icon for spot light gizmo and updated directional light icon.
Removed icons that are no longer needed on puppet side.

Change-Id: Id1e72c80e122250f7edc8a69a0e5720e755b96fc
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2020-03-12 17:22:51 +02:00
parent 83a60f10ce
commit 83d590950b
47 changed files with 35 additions and 58 deletions

View File

@@ -36,7 +36,9 @@ IconGizmo {
? "qrc:///qtquickplugin/mockfiles/images/directional_light_gradient.png"
: targetNode instanceof AreaLight
? "qrc:///qtquickplugin/mockfiles/images/area_light_gradient.png"
: "qrc:///qtquickplugin/mockfiles/images/point_light_gradient.png"
: targetNode instanceof PointLight
? "qrc:///qtquickplugin/mockfiles/images/point_light_gradient.png"
: "qrc:///qtquickplugin/mockfiles/images/spot_light_gradient.png"
: "qrc:///qtquickplugin/mockfiles/images/point_light_gradient.png"
// ColorOverlay doesn't work correctly with hidden windows so commenting it out for now

View File

@@ -35,20 +35,13 @@ Rectangle {
id: root
color: toggleBackground && toggled ? "#aa000000" : mouseArea.containsMouse ? "#44000000" : "#00000000"
width: img.width + txt.width + 5
height: img.height
Image {
id: img
anchors.verticalCenter: parent.verticalCenter
source: "qrc:///qtquickplugin/mockfiles/images/" + root.states[toggled ? 1 : 0].iconId + ".png"
}
width: txt.width + 5
height: 16
Text {
id: txt
color: "#b5b5b5"
anchors.verticalCenter: parent.verticalCenter
anchors.left: img.right
text: root.states[toggled ? 1 : 0].text
}

View File

@@ -41,8 +41,8 @@ Rectangle {
property var _buttonGroupArray: []
id: root
width: img.width + 5
height: img.height + 5
width: 16
height: 16
color: root.selected ? "#aa000000" : (mouseArea.containsMouse ? "#44000000" : "#00000000")
radius: 3
@@ -65,13 +65,6 @@ Rectangle {
delay: 1000
}
Image {
id: img
anchors.centerIn: parent
source: root.selected ? "qrc:///qtquickplugin/mockfiles/images/" + root.tool + "_selected.png"
: "qrc:///qtquickplugin/mockfiles/images/" + root.tool + "_active.png"
}
Shortcut {
sequence: root.currentShortcut
onActivated: mouseArea.onClicked(null)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 561 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 904 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 869 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -32,6 +32,7 @@
#include <QtQuick3D/private/qquick3darealight_p.h>
#include <QtQuick3D/private/qquick3ddirectionallight_p.h>
#include <QtQuick3D/private/qquick3dpointlight_p.h>
#include <QtQuick3D/private/qquick3dspotlight_p.h>
#include <QtCore/qmath.h>
#include <limits>
@@ -115,6 +116,10 @@ void LightGeometry::fillVertexData(QByteArray &vertexData, QByteArray &indexData
// and resize later when we know the exact count.
vertexSize = int(sizeof(float)) * 3 * pointLightDensity * pointLightDensity * 4;
indexSize = int(sizeof(quint16)) * pointLightDensity * pointLightDensity * 4;
} else if (qobject_cast<QQuick3DSpotLight *>(m_light)) {
// TODO: Spot light model, for now use area light model
vertexSize = int(sizeof(float)) * 3 * dirSegments * 2;
indexSize = int(sizeof(quint16)) * dirSegments * 2 * 2;
}
vertexData.resize(vertexSize);
indexData.resize(indexSize);
@@ -181,9 +186,29 @@ void LightGeometry::fillVertexData(QByteArray &vertexData, QByteArray &indexData
indexSize += 2 * sizeof(quint16);
}
}
vertexData.resize(vertexSize);
indexData.resize(indexSize);
} else if (qobject_cast<QQuick3DSpotLight *>(m_light)) {
// TODO: Spot light model, for now use area light model
*dataPtr++ = -1.f; *dataPtr++ = 1.f; *dataPtr++ = 0.f;
*dataPtr++ = -1.f; *dataPtr++ = -1.f; *dataPtr++ = 0.f;
*dataPtr++ = 1.f; *dataPtr++ = -1.f; *dataPtr++ = 0.f;
*dataPtr++ = 1.f; *dataPtr++ = 1.f; *dataPtr++ = 0.f;
*dataPtr++ = -1.f; *dataPtr++ = 1.f; *dataPtr++ = -1.f;
*dataPtr++ = -1.f; *dataPtr++ = -1.f; *dataPtr++ = -1.f;
*dataPtr++ = 1.f; *dataPtr++ = -1.f; *dataPtr++ = -1.f;
*dataPtr++ = 1.f; *dataPtr++ = 1.f; *dataPtr++ = -1.f;
*indexPtr++ = 0; *indexPtr++ = 1;
*indexPtr++ = 1; *indexPtr++ = 2;
*indexPtr++ = 2; *indexPtr++ = 3;
*indexPtr++ = 3; *indexPtr++ = 0;
*indexPtr++ = 0; *indexPtr++ = 4;
*indexPtr++ = 1; *indexPtr++ = 5;
*indexPtr++ = 2; *indexPtr++ = 6;
*indexPtr++ = 3; *indexPtr++ = 7;
}
static const float floatMin = std::numeric_limits<float>::lowest();

View File

@@ -41,49 +41,13 @@
<file>mockfiles/meshes/axishelper.mesh</file>
<file>mockfiles/images/editor_camera.png</file>
<file>mockfiles/images/editor_camera@2x.png</file>
<file>mockfiles/images/light-pick-icon.png</file>
<file>mockfiles/images/light-pick-icon@2x.png</file>
<file>mockfiles/images/item_selection_active.png</file>
<file>mockfiles/images/item_selection_active@2x.png</file>
<file>mockfiles/images/item_selection_selected.png</file>
<file>mockfiles/images/item_selection_selected@2x.png</file>
<file>mockfiles/images/group_selection_selected.png</file>
<file>mockfiles/images/group_selection_selected@2x.png</file>
<file>mockfiles/images/group_selection_active.png</file>
<file>mockfiles/images/group_selection_active@2x.png</file>
<file>mockfiles/images/move_active.png</file>
<file>mockfiles/images/move_active@2x.png</file>
<file>mockfiles/images/move_selected.png</file>
<file>mockfiles/images/move_selected@2x.png</file>
<file>mockfiles/images/rotate_active.png</file>
<file>mockfiles/images/rotate_active@2x.png</file>
<file>mockfiles/images/rotate_selected.png</file>
<file>mockfiles/images/rotate_selected@2x.png</file>
<file>mockfiles/images/scale_active.png</file>
<file>mockfiles/images/scale_active@2x.png</file>
<file>mockfiles/images/scale_selected.png</file>
<file>mockfiles/images/scale_selected@2x.png</file>
<file>mockfiles/images/directional_light_gradient.png</file>
<file>mockfiles/images/directional_light_gradient@2x.png</file>
<file>mockfiles/images/point_light_gradient.png</file>
<file>mockfiles/images/point_light_gradient@2x.png</file>
<file>mockfiles/images/area_light_gradient.png</file>
<file>mockfiles/images/area_light_gradient@2x.png</file>
<file>mockfiles/images/fit_active.png</file>
<file>mockfiles/images/fit_active@2x.png</file>
<file>mockfiles/images/fit_selected.png</file>
<file>mockfiles/images/fit_selected@2x.png</file>
<file>mockfiles/images/local.png</file>
<file>mockfiles/images/local@2x.png</file>
<file>mockfiles/images/global.png</file>
<file>mockfiles/images/global@2x.png</file>
<file>mockfiles/images/ortho.png</file>
<file>mockfiles/images/ortho@2x.png</file>
<file>mockfiles/images/persp.png</file>
<file>mockfiles/images/persp@2x.png</file>
<file>mockfiles/images/edit_light_off.png</file>
<file>mockfiles/images/edit_light_off@2x.png</file>
<file>mockfiles/images/edit_light_on.png</file>
<file>mockfiles/images/edit_light_on@2x.png</file>
<file>mockfiles/images/spot_light_gradient.png</file>
<file>mockfiles/images/spot_light_gradient@2x.png</file>
</qresource>
</RCC>