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:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user