Skip to content

Commit 80f9428

Browse files
authored
Merge pull request o3de#17171 from pollend/bugfix/GHI-16956-resolve-gray-color-axis
bugfix: resolve VectorInput labels gray upon activate/deactive component
2 parents f1c7eee + e3baf71 commit 80f9428

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/VectorInput.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <QLabel>
1717
#include <QStyleOptionSpinBox>
1818
#include <QHBoxLayout>
19+
#include <QEvent>
1920

2021
namespace AzQtComponents
2122
{
@@ -109,6 +110,15 @@ void VectorElement::setCoordinate(VectorElement::Coordinate coordinate)
109110
setProperty(g_CoordinatePropertyName, QVariant::fromValue(coordinate));
110111
}
111112

113+
void VectorElement::changeEvent(QEvent* event) {
114+
115+
if(event->type() == QEvent::EnabledChange) {
116+
style()->unpolish(m_label);
117+
style()->polish(m_label);
118+
}
119+
QWidget::changeEvent(event);
120+
}
121+
112122
QSize VectorElement::sizeHint() const
113123
{
114124
QSize size = m_spinBox->sizeHint();

Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/VectorInput.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ namespace AzQtComponents
106106

107107
void onSpinBoxEditingFinished();
108108

109+
virtual void changeEvent(QEvent* event) override;
109110
private:
110111
struct DeferredSetValue
111112
{

0 commit comments

Comments
 (0)