mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
First round of caf::FontTools
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user