From: vsv Date: Thu, 27 Jun 2019 13:48:22 +0000 (+0300) Subject: Set preferences for color scale X-Git-Tag: VEDF2019Lot4~103^2~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fd8b8afdf81164266b0a8343bd1a5c09aeeac967;p=modules%2Fshaper.git Set preferences for color scale --- diff --git a/src/XGUI/SHAPER.xml b/src/XGUI/SHAPER.xml index 525736c32..e580f31a1 100644 --- a/src/XGUI/SHAPER.xml +++ b/src/XGUI/SHAPER.xml @@ -14,6 +14,12 @@ + + + + + +
diff --git a/src/XGUI/XGUI_ViewerProxy.cpp b/src/XGUI/XGUI_ViewerProxy.cpp index ea1b76807..367b8ad86 100644 --- a/src/XGUI/XGUI_ViewerProxy.cpp +++ b/src/XGUI/XGUI_ViewerProxy.cpp @@ -644,10 +644,20 @@ void XGUI_ViewerProxy::setColorScaleTitle(const QString& theText) //****************************************************** void XGUI_ViewerProxy::setupColorScale() { - setColorScalePosition(0.03, 0.35); - setColorScaleSize(0.2, 0.5); - setColorScaleTextHeigth(14); - setColorScaleIntervals(20); + SUIT_ResourceMgr* aResMgr = ModuleBase_Preferences::resourceMgr(); + double aX = aResMgr->doubleValue("Viewer", "scalar_bar_x_position", 0.03); + double aY = aResMgr->doubleValue("Viewer", "scalar_bar_y_position", 0.35); + setColorScalePosition(aX, aY); + + double aW = aResMgr->doubleValue("Viewer", "scalar_bar_width", 0.2); + double aH = aResMgr->doubleValue("Viewer", "scalar_bar_height", 0.5); + setColorScaleSize(aW, aH); + + int aT = aResMgr->integerValue("Viewer", "scalar_bar_text_height", 14); + setColorScaleTextHeigth(aT); + + int aN = aResMgr->integerValue("Viewer", "scalar_bar_nb_intervals", 20); + setColorScaleIntervals(aN); }