From: nds Date: Wed, 4 Oct 2017 07:17:11 +0000 (+0300) Subject: #2205 Ability to customize the arrows and texts of dimensions: applying Font value X-Git-Tag: V_2.9.0~20 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f3d367f1403df833970d64dcf29179497e3362f3;p=modules%2Fshaper.git #2205 Ability to customize the arrows and texts of dimensions: applying Font value --- diff --git a/src/SketchPlugin/SketchPlugin_Plugin.cpp b/src/SketchPlugin/SketchPlugin_Plugin.cpp index 9feecc92a..8967c182d 100644 --- a/src/SketchPlugin/SketchPlugin_Plugin.cpp +++ b/src/SketchPlugin/SketchPlugin_Plugin.cpp @@ -173,9 +173,10 @@ SketchPlugin_Plugin::SketchPlugin_Plugin() #endif Config_PropManager::registerProp(SKETCH_TAB_NAME, "dimension_font", "Dimension font", - Config_Prop::String, "Arial"); + Config_Prop::String, "Times-bold"); std::ostringstream aStream; aStream << SketcherPrs_Tools::getDefaultTextHeight(); + Config_PropManager::registerProp(SKETCH_TAB_NAME, "dimension_value_size", "Dimension value size", Config_Prop::Integer, aStream.str()); aStream.str(""); diff --git a/src/SketcherPrs/SketcherPrs_LengthDimension.cpp b/src/SketcherPrs/SketcherPrs_LengthDimension.cpp index c0c79a10a..898771342 100644 --- a/src/SketcherPrs/SketcherPrs_LengthDimension.cpp +++ b/src/SketcherPrs/SketcherPrs_LengthDimension.cpp @@ -94,6 +94,8 @@ void updateArrows(Handle(Prs3d_DimensionAspect) theDimAspect, theDimAspect->SetExtensionSize( (theTextSize / aViewerScale + SketcherPrs_Tools::getArrowSize()) / 2.0); } + theDimAspect->TextAspect()->SetFont(Config_PropManager::string(SKETCH_TAB_NAME, + "dimension_font").c_str()); theDimAspect->SetArrowTailSize(theDimAspect->ArrowAspect()->Length()); // The value of vertical aligment is sometimes changed