#4256 Update fonts in Project and views when changing preferences

This commit is contained in:
Gaute Lindkvist
2019-04-10 12:49:20 +02:00
parent 0e0d78104b
commit 798e3ff19e
32 changed files with 411 additions and 129 deletions

View File

@@ -639,7 +639,7 @@ void RivGridBoxGenerator::createLegend(EdgeType edge, cvf::Collection<cvf::Part>
cvf::ref<cvf::DrawableText> geo = new cvf::DrawableText;
cvf::Font* standardFont = RiaApplication::instance()->standardFont();
cvf::Font* standardFont = RiaApplication::instance()->defaultSceneFont();
geo->setFont(standardFont);
geo->setTextColor(m_gridLegendColor);

View File

@@ -606,8 +606,8 @@ void RivIntersectionPartMgr::createFaultLabelParts(const std::vector<std::pair<Q
if (!(eclipseView && faultInViewColl->showFaultLabel())) return;
cvf::Color3f defWellLabelColor = faultInViewColl->faultLabelColor();
cvf::Font* font = RiaApplication::instance()->customFont();
cvf::Color3f faultLabelColor = faultInViewColl->faultLabelColor();
cvf::Font* font = RiaApplication::instance()->defaultSceneFont();
std::vector<cvf::Vec3f> lineVertices;
@@ -618,7 +618,7 @@ void RivIntersectionPartMgr::createFaultLabelParts(const std::vector<std::pair<Q
drawableText->setDrawBorder(false);
drawableText->setDrawBackground(false);
drawableText->setVerticalAlignment(cvf::TextDrawer::BASELINE);
drawableText->setTextColor(defWellLabelColor);
drawableText->setTextColor(faultLabelColor);
}
cvf::BoundingBox bb = m_crossSectionFaces->boundingBox();

View File

@@ -482,7 +482,7 @@ void RivFaultPartMgr::createLabelWithAnchorLine(const cvf::Part* part)
// Fault label
if (!m_rimFault->name().isEmpty())
{
cvf::Font* font = RiaApplication::instance()->customFont();
cvf::Font* font = RiaApplication::instance()->defaultWellLabelFont();
cvf::ref<cvf::DrawableText> drawableText = new cvf::DrawableText;
drawableText->setFont(font);

View File

@@ -190,7 +190,7 @@ void RivMeasurementPartMgr::buildPolyLineParts(const cvf::Camera* camera,
auto fontColor = cvf::Color3f::BLACK;
QString text = m_measurement->label();
auto labelPosition = pointsInDisplay.back();
auto font = RiaApplication::instance()->customFont();
auto font = RiaApplication::instance()->defaultWellLabelFont();
cvf::ref<cvf::DrawableText> drawableText = new cvf::DrawableText;
drawableText->setFont(font);

View File

@@ -297,7 +297,7 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex,
if (well->showWellLabel() && !well->name().isEmpty())
{
cvf::Font* font = RiaApplication::instance()->customFont();
cvf::Font* font = RiaApplication::instance()->defaultWellLabelFont();
cvf::ref<cvf::DrawableText> drawableText = new cvf::DrawableText;
drawableText->setFont(font);

View File

@@ -612,7 +612,7 @@ void RivWellPathPartMgr::buildWellPathParts(const caf::DisplayCoordTransform* di
if (wellPathCollection->showWellPathLabel() && m_rimWellPath->showWellPathLabel() && !m_rimWellPath->name().isEmpty())
{
cvf::Font* font = RiaApplication::instance()->customFont();
cvf::Font* font = RiaApplication::instance()->defaultWellLabelFont();
cvf::ref<cvf::DrawableText> drawableText = new cvf::DrawableText;
drawableText->setFont(font);