#4255 Read default plot font sizes from preferences and apply

This commit is contained in:
Gaute Lindkvist
2019-04-12 14:47:21 +02:00
parent 798e3ff19e
commit 9d06b59357
35 changed files with 679 additions and 202 deletions
+16 -3
View File
@@ -75,10 +75,11 @@ RiaPreferences::RiaPreferences(void)
CAF_PDM_InitField(&defaultScaleFactorZ, "defaultScaleFactorZ", 5, "Default Z Scale Factor", "", "", "");
CAF_PDM_InitFieldNoDefault(&defaultFontSizeInScene, "fontSizeInScene", "Viewer Font", "", "", "");
CAF_PDM_InitFieldNoDefault(&defaultSceneFontSize, "fontSizeInScene", "Viewer Font", "", "", "");
CAF_PDM_InitFieldNoDefault(&defaultAnnotationFontSize, "defaultAnnotationFontSize", "Annotation Font Size", "", "", "");
CAF_PDM_InitFieldNoDefault(&defaultWellLabelFontSize, "wellLabelFontSize", "Well Label Font Size", "", "", "");
CAF_PDM_InitFieldNoDefault(&defaultWellLabelFontSize, "wellLabelFontSize", "Well Label Font Size", "", "", "");
CAF_PDM_InitFieldNoDefault(&defaultPlotFontSize, "defaultPlotFontSize", "Plot Font Size", "", "", "");
defaultPlotFontSize = RiaFontCache::FONT_SIZE_10;
CAF_PDM_InitField(&showLasCurveWithoutTvdWarning, "showLasCurveWithoutTvdWarning", true, "Show LAS Curve Without TVD Warning", "", "", "");
showLasCurveWithoutTvdWarning.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN);
@@ -206,7 +207,7 @@ void RiaPreferences::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
colorGroup->add(&defaultWellLabelColor);
caf::PdmUiGroup* fontGroup = uiOrdering.addNewGroup("Default Font Sizes");
fontGroup->add(&defaultFontSizeInScene);
fontGroup->add(&defaultSceneFontSize);
fontGroup->add(&defaultAnnotationFontSize, false);
fontGroup->add(&defaultWellLabelFontSize);
fontGroup->add(&defaultPlotFontSize, false);
@@ -368,3 +369,15 @@ QString RiaPreferences::holoLensExportFolder() const
return m_holoLensExportFolder();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::map<RiaDefines::FontSettingType, RiaFontCache::FontSize> RiaPreferences::defaultFontSizes() const
{
std::map<RiaDefines::FontSettingType, RiaFontCache::FontSize> fontSizes;
fontSizes[RiaDefines::SCENE_FONT] = defaultSceneFontSize();
fontSizes[RiaDefines::ANNOTATION_FONT] = defaultAnnotationFontSize();
fontSizes[RiaDefines::WELL_LABEL_FONT] = defaultWellLabelFontSize();
fontSizes[RiaDefines::PLOT_FONT] = defaultPlotFontSize();
return fontSizes;
}