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

@@ -18,6 +18,8 @@
#include "RimLegendConfig.h"
#include "RiaPreferences.h"
// NB! Special macro for pure virtual class
CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimLegendConfig, "LegendConfig" );
@@ -46,3 +48,15 @@ RimLegendConfig::RimLegendConfig()
RimLegendConfig::~RimLegendConfig()
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RimLegendConfig::fontSize() const
{
caf::FontHolderInterface* parentFontHolder = nullptr;
this->firstAncestorOfType(parentFontHolder);
if (parentFontHolder) return parentFontHolder->fontSize();
return caf::FontTools::absolutePointSize(RiaPreferences::current()->defaultSceneFontSize());
}