First round of caf::FontTools

This commit is contained in:
Gaute Lindkvist
2020-05-09 11:23:58 +02:00
parent 0e70cf809c
commit 2fe4372dc2
86 changed files with 1021 additions and 966 deletions

View File

@@ -245,8 +245,9 @@ void RimTernaryLegendConfig::recreateLegend()
// has been removed, (and thus the opengl resources has been deleted) The text in
// the legend disappeared because of this, so workaround: recreate the legend when needed:
cvf::Font* standardFont = RiaApplication::instance()->defaultSceneFont();
m_legend = new RivTernarySaturationOverlayItem( standardFont );
int fontSize = this->fontSize();
cvf::Font* font = RiaApplication::instance()->sceneFont(fontSize);
m_legend = new RivTernarySaturationOverlayItem( font );
m_legend->setLayout( cvf::OverlayItem::VERTICAL, cvf::OverlayItem::BOTTOM_LEFT );
updateLegend();
@@ -526,6 +527,14 @@ caf::TitledOverlayFrame* RimTernaryLegendConfig::titledOverlayFrame()
return m_legend.p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimTernaryLegendConfig::updateFonts()
{
recreateLegend();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------