Fix Dimension Text Color
- Dimension text did not respect Color property setting.
This commit is contained in:
@@ -58,6 +58,7 @@ QGCustomText::QGCustomText()
|
||||
|
||||
isHighlighted = false;
|
||||
m_colCurrent = getNormalColor();
|
||||
m_colNormal = m_colCurrent;
|
||||
}
|
||||
|
||||
void QGCustomText::centerAt(QPointF centerPos)
|
||||
@@ -111,7 +112,8 @@ void QGCustomText::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||
}
|
||||
|
||||
void QGCustomText::setPrettyNormal() {
|
||||
m_colCurrent = getNormalColor();
|
||||
// m_colCurrent = getNormalColor();
|
||||
m_colCurrent = m_colNormal;
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ public:
|
||||
virtual QColor getNormalColor(void);
|
||||
virtual QColor getPreColor(void);
|
||||
virtual QColor getSelectColor(void);
|
||||
virtual void setColor(QColor c) { m_colNormal = c; }
|
||||
void makeMark(double x, double y);
|
||||
void makeMark(Base::Vector3d v);
|
||||
|
||||
@@ -70,6 +71,7 @@ protected:
|
||||
|
||||
bool isHighlighted;
|
||||
QColor m_colCurrent;
|
||||
QColor m_colNormal;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -274,6 +274,13 @@ void QGIDatumLabel::setPrettyNormal(void)
|
||||
m_tolText->setPrettyNormal();
|
||||
}
|
||||
|
||||
void QGIDatumLabel::setColor(QColor c)
|
||||
{
|
||||
m_colNormal = c;
|
||||
m_dimText->setColor(m_colNormal);
|
||||
m_tolText->setColor(m_colNormal);
|
||||
}
|
||||
|
||||
//**************************************************************
|
||||
QGIViewDimension::QGIViewDimension() :
|
||||
hasHover(false),
|
||||
@@ -286,6 +293,7 @@ QGIViewDimension::QGIViewDimension() :
|
||||
|
||||
datumLabel = new QGIDatumLabel();
|
||||
addToGroup(datumLabel);
|
||||
datumLabel->setColor(getNormalColor());
|
||||
datumLabel->setPrettyNormal();
|
||||
dimLines = new QGIDimLines();
|
||||
addToGroup(dimLines);
|
||||
@@ -482,6 +490,9 @@ void QGIViewDimension::draw()
|
||||
return;
|
||||
}
|
||||
|
||||
m_colNormal = getNormalColor();
|
||||
datumLabel->setColor(m_colNormal);
|
||||
|
||||
m_lineWidth = Rez::guiX(vp->LineWidth.getValue());
|
||||
float margin = Rez::guiX(5.f);
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ public:
|
||||
void setPrettySel(void);
|
||||
void setPrettyPre(void);
|
||||
void setPrettyNormal(void);
|
||||
void setColor(QColor c);
|
||||
|
||||
QGCustomText* getDimText(void) { return m_dimText; }
|
||||
void setDimText(QGCustomText* newText) { m_dimText = newText; }
|
||||
@@ -101,6 +102,7 @@ protected:
|
||||
QGCustomText* m_tolText;
|
||||
int getPrecision(void);
|
||||
double getTolAdjust(void);
|
||||
QColor m_colNormal;
|
||||
|
||||
double posX;
|
||||
double posY;
|
||||
|
||||
Reference in New Issue
Block a user