summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/Inspector
diff options
context:
space:
mode:
Diffstat (limited to 'src/Authoring/Studio/Palettes/Inspector')
-rw-r--r--src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp1
-rw-r--r--src/Authoring/Studio/Palettes/Inspector/InspectorControlView.h2
-rw-r--r--src/Authoring/Studio/Palettes/Inspector/InspectorControlView.qml6
3 files changed, 7 insertions, 2 deletions
diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
index eb1ece18..6ba75709 100644
--- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
+++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
@@ -250,6 +250,7 @@ void InspectorControlView::initialize()
rootContext()->setContextProperty(QStringLiteral("_resDir"), StudioUtils::resourceImageUrl());
rootContext()->setContextProperty(QStringLiteral("_tabOrderHandler"), tabOrderHandler());
rootContext()->setContextProperty(QStringLiteral("_mouseHelper"), &m_mouseHelper);
+ rootContext()->setContextProperty(QStringLiteral("_utils"), &m_qmlUtils);
m_mouseHelper.setWidget(this);
qmlRegisterUncreatableType<qt3dsdm::DataModelDataType>(
diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.h b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.h
index c997721a..ace070b6 100644
--- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.h
+++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.h
@@ -36,6 +36,7 @@
#include "Qt3DSFileTools.h"
#include "TabOrderHandler.h"
#include "MouseHelper.h"
+#include "QmlUtils.h"
#include "DataInputSelectView.h"
class InspectorControlModel;
@@ -144,6 +145,7 @@ private:
QPointer<DataInputSelectView> m_dataInputChooserView;
std::vector<Q3DStudio::CFilePath> m_fileList;
MouseHelper m_mouseHelper;
+ QmlUtils m_qmlUtils;
int m_instance = 0;
int m_handle = 0;
diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.qml b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.qml
index a94f5f34..02e8f4c1 100644
--- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.qml
+++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.qml
@@ -1246,7 +1246,8 @@ Rectangle {
Rectangle {
property bool toggled: tagsModel ? tagsModel.selected : false
- property string grpColor: grpModel ? grpModel.color : ""
+ property color grpColor: grpModel ? grpModel.color : ""
+ property bool isBright: grpModel ? _utils.isBright(grpColor) : false
width: Math.max(tLabel.width + 10, 60)
height: 25
@@ -1257,7 +1258,8 @@ Rectangle {
id: tLabel
anchors.centerIn: parent
text: tagsModel ? tagsModel.tag : ""
- color: toggled ? _textColor : _studioColor4
+ color: toggled ? (isBright ? _studioColor1 : _textColor)
+ : _studioColor4
}
MouseArea {