diff --git a/doc/salome/gui/SMESH/images/colors_size.png b/doc/salome/gui/SMESH/images/colors_size.png
index 53b14620c..83121a791 100755
Binary files a/doc/salome/gui/SMESH/images/colors_size.png and b/doc/salome/gui/SMESH/images/colors_size.png differ
diff --git a/doc/salome/gui/SMESH/input/colors_size.doc b/doc/salome/gui/SMESH/input/colors_size.doc
index aa244579b..33c673363 100644
--- a/doc/salome/gui/SMESH/input/colors_size.doc
+++ b/doc/salome/gui/SMESH/input/colors_size.doc
@@ -9,8 +9,9 @@ parameters:
Elements
-Fill - color of surface of elements (seen in Shading mode).
-Back Face - color of interior surface of elements.
+Surface color - color of surface of elements (seen in Shading mode).
+Back surface color - color of interior surface of elements. Use slider to select this color. This color
+generated on base of the Surface color by changing it's brightness and saturation.
Outline - color of borders of elements.
0D slements - color of 0D elements.
Size of 0D slements - size of 0D elements.
diff --git a/resources/SalomeApp.xml.in b/resources/SalomeApp.xml.in
index 664c824b5..bc565c375 100644
--- a/resources/SalomeApp.xml.in
+++ b/resources/SalomeApp.xml.in
@@ -29,9 +29,8 @@
-
+
-
diff --git a/src/OBJECT/SMESH_Actor.cxx b/src/OBJECT/SMESH_Actor.cxx
index e867630dc..e32067023 100644
--- a/src/OBJECT/SMESH_Actor.cxx
+++ b/src/OBJECT/SMESH_Actor.cxx
@@ -40,6 +40,8 @@
#include "SUIT_Session.h"
#include "SUIT_ResourceMgr.h"
+#include
+
#ifndef DISABLE_PLOT2DVIEWER
#include
#endif
@@ -146,12 +148,15 @@ SMESH_ActorDef::SMESH_ActorDef()
//-----------------------------------------
vtkFloatingPointType anRGB[3] = {1,1,1};
mySurfaceProp = vtkProperty::New();
- SMESH::GetColor( "SMESH", "fill_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 170, 255 ) );
- mySurfaceProp->SetColor( anRGB[0], anRGB[1], anRGB[2] );
+ QColor ffc, bfc;
+ int delta;
+ SMESH::GetColor( "SMESH", "fill_color", ffc, delta, "0,170,255|-100" ) ;
+ mySurfaceProp->SetColor( ffc.red() / 255. , ffc.green() / 255. , ffc.blue() / 255. );
+ myDeltaBrightness = delta;
myBackSurfaceProp = vtkProperty::New();
- SMESH::GetColor( "SMESH", "backface_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 0, 255 ) );
- myBackSurfaceProp->SetColor( anRGB[0], anRGB[1], anRGB[2] );
+ bfc = Qtx::mainColorToSecondary(ffc, delta);
+ myBackSurfaceProp->SetColor( bfc.red() / 255. , bfc.green() / 255. , bfc.blue() / 255. );
my2DActor = SMESH_DeviceActor::New();
my2DActor->SetUserMatrix(aMatrix);
@@ -1749,27 +1754,23 @@ vtkFloatingPointType SMESH_ActorDef::GetOpacity(){
}
-void SMESH_ActorDef::SetSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b){
+void SMESH_ActorDef::SetSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b, int delta){
mySurfaceProp->SetColor(r,g,b);
if( SMESH_GroupObj* aGroupObj = dynamic_cast( myVisualObj.get() ) )
if( aGroupObj->GetElementType() == SMDSAbs_Face ||
aGroupObj->GetElementType() == SMDSAbs_Volume )
myNameActor->SetBackgroundColor(r,g,b);
+
+ myDeltaBrightness = delta;
+ QColor bfc = Qtx::mainColorToSecondary(QColor(int(r*255),int(g*255),int(b*255)), delta);
+ myBackSurfaceProp->SetColor( bfc.red() / 255. , bfc.green() / 255. , bfc.blue() / 255. );
Modified();
}
-void SMESH_ActorDef::GetSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b){
+void SMESH_ActorDef::GetSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b, int& delta){
::GetColor(mySurfaceProp,r,g,b);
my2DExtProp->SetColor(1.0-r,1.0-g,1.0-b);
-}
-
-void SMESH_ActorDef::SetBackSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b){
- myBackSurfaceProp->SetColor(r,g,b);
- Modified();
-}
-
-void SMESH_ActorDef::GetBackSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b){
- ::GetColor(myBackSurfaceProp,r,g,b);
+ delta = myDeltaBrightness;
}
void SMESH_ActorDef::SetEdgeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b){
diff --git a/src/OBJECT/SMESH_Actor.h b/src/OBJECT/SMESH_Actor.h
index 202541bb1..cdd4b3e44 100644
--- a/src/OBJECT/SMESH_Actor.h
+++ b/src/OBJECT/SMESH_Actor.h
@@ -61,12 +61,9 @@ class SMESHOBJECT_EXPORT SMESH_Actor: public SALOME_Actor
const char* theName,
int theIsClear);
- virtual void SetSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
- virtual void GetSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
-
- virtual void SetBackSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
- virtual void GetBackSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
-
+ virtual void SetSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b, int delta ) = 0;
+ virtual void GetSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b, int& delta ) = 0;
+
virtual void SetEdgeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
virtual void GetEdgeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
diff --git a/src/OBJECT/SMESH_ActorDef.h b/src/OBJECT/SMESH_ActorDef.h
index 682748007..5cac53691 100644
--- a/src/OBJECT/SMESH_ActorDef.h
+++ b/src/OBJECT/SMESH_ActorDef.h
@@ -104,11 +104,8 @@ class SMESH_ActorDef : public SMESH_Actor
virtual void SetOpacity(vtkFloatingPointType theValue);
virtual vtkFloatingPointType GetOpacity();
- virtual void SetSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b);
- virtual void GetSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b);
-
- virtual void SetBackSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b);
- virtual void GetBackSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b);
+ virtual void SetSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b, int delta );
+ virtual void GetSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b, int& delta);
virtual void SetEdgeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b);
virtual void GetEdgeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b);
@@ -293,6 +290,8 @@ class SMESH_ActorDef : public SMESH_Actor
#endif
bool myIsFacesOriented;
+
+ int myDeltaBrightness;
VTK::MarkerTexture myMarkerTexture;
diff --git a/src/OBJECT/SMESH_ActorUtils.cxx b/src/OBJECT/SMESH_ActorUtils.cxx
index 3ddfdc590..ee0a31efd 100644
--- a/src/OBJECT/SMESH_ActorUtils.cxx
+++ b/src/OBJECT/SMESH_ActorUtils.cxx
@@ -35,6 +35,8 @@
#include
#endif
+#include
+
#include "utilities.h"
@@ -137,6 +139,23 @@ namespace SMESH
b = ib / 255.;
}
+
+ void
+ GetColor( const QString& theSect,
+ const QString& theName,
+ QColor& color,
+ int& delta,
+ QString def)
+ {
+
+ SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
+ if ( mgr ) {
+ QString str = mgr->stringValue( theSect, theName, def );
+ Qtx::stringToBiColor(str,color,delta);
+ }
+ }
+
+
#ifndef DISABLE_PLOT2DVIEWER
//=======================================================================
/**
diff --git a/src/OBJECT/SMESH_ActorUtils.h b/src/OBJECT/SMESH_ActorUtils.h
index 29ce4618d..e98d0f5de 100644
--- a/src/OBJECT/SMESH_ActorUtils.h
+++ b/src/OBJECT/SMESH_ActorUtils.h
@@ -67,6 +67,14 @@ SMESHOBJECT_EXPORT
vtkFloatingPointType&,
const QColor& = QColor() );
+ SMESHOBJECT_EXPORT
+ void
+ GetColor( const QString& theSect,
+ const QString& theName,
+ QColor& color,
+ int& delta,
+ QString def);
+
SMESHOBJECT_EXPORT
void
WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid,
diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx
index 2fab51464..7e69c5680 100644
--- a/src/SMESHGUI/SMESHGUI.cxx
+++ b/src/SMESHGUI/SMESHGUI.cxx
@@ -787,8 +787,12 @@
anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B );
else if( aGroupObject->GetType() == SMESH::ELEM0D )
anActor->Set0DColor( aColor.R, aColor.G, aColor.B );
- else
- anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B );
+ else {
+ QColor c;
+ int delta;
+ SMESH::GetColor("SMESH", "fill_color", c, delta, "0,170,255|-100");
+ anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B, delta );
+ }
}
}
}
@@ -1029,6 +1033,7 @@
}
case 1132:{
QColor c, e, b, n, c0D, o;
+ int delta;
int size0D = 0;
int Edgewidth = 0;
vtkFloatingPointType Shrink = 0.0;
@@ -1045,7 +1050,7 @@
if(IObject->hasEntry()){
if(SMESH_Actor *anActor = SMESH::FindActorByEntry(IObject->getEntry())){
vtkFloatingPointType color[3];
- anActor->GetSufaceColor(color[0], color[1], color[2]);
+ anActor->GetSufaceColor(color[0], color[1], color[2],delta);
int c0 = int (color[0] * 255);
int c1 = int (color[1] * 255);
int c2 = int (color[2] * 255);
@@ -1058,13 +1063,6 @@
c2 = int (edgecolor[2] * 255);
e.setRgb(c0, c1, c2);
- vtkFloatingPointType backfacecolor[3];
- anActor->GetBackSufaceColor(backfacecolor[0], backfacecolor[1], backfacecolor[2]);
- c0 = int (backfacecolor[0] * 255);
- c1 = int (backfacecolor[1] * 255);
- c2 = int (backfacecolor[2] * 255);
- b.setRgb(c0, c1, c2);
-
vtkFloatingPointType nodecolor[3];
anActor->GetNodeColor(nodecolor[0], nodecolor[1], nodecolor[2]);
c0 = int (nodecolor[0] * 255);
@@ -1113,7 +1111,7 @@
aDlg->SetColor(1, c);
aDlg->SetColor(2, e);
aDlg->SetColor(3, n);
- aDlg->SetColor(4, b);
+ aDlg->SetDeltaBrightness(delta);
aDlg->SetColor(5, c0D);
aDlg->SetColor(6, o);
aDlg->SetIntValue(1, Edgewidth);
@@ -1136,6 +1134,7 @@
QColor backfacecolor = aDlg->GetColor(4);
QColor color0D = aDlg->GetColor(5);
QColor faces_orientation_color = aDlg->GetColor(6);
+ int delta = aDlg->GetDeltaBrightness();
/* Point marker */
theMarkerMap[ aStudy->StudyId() ] = aDlg->getCustomMarkerMap();
@@ -1148,11 +1147,8 @@
/* actor color and backface color */
anActor->SetSufaceColor(vtkFloatingPointType (color.red()) / 255.,
vtkFloatingPointType (color.green()) / 255.,
- vtkFloatingPointType (color.blue()) / 255.);
- anActor->SetBackSufaceColor(vtkFloatingPointType (backfacecolor.red()) / 255.,
- vtkFloatingPointType (backfacecolor.green()) / 255.,
- vtkFloatingPointType (backfacecolor.blue()) / 255.);
-
+ vtkFloatingPointType (color.blue()) / 255.,
+ delta);
/* edge color */
anActor->SetEdgeColor(vtkFloatingPointType (edgecolor.red()) / 255.,
vtkFloatingPointType (edgecolor.green()) / 255.,
@@ -4505,11 +4501,13 @@ void SMESHGUI::createPreferences()
int elemGroup = addPreference( tr( "PREF_GROUP_ELEMENTS" ), meshTab );
setPreferenceProperty( elemGroup, "columns", 2 );
- addPreference( tr( "PREF_FILL" ), elemGroup, LightApp_Preferences::Color, "SMESH", "fill_color" );
+ int ColorId = addPreference( tr( "PREF_FILL" ), elemGroup, LightApp_Preferences::BiColor, "SMESH", "fill_color" );
addPreference( tr( "PREF_OUTLINE" ), elemGroup, LightApp_Preferences::Color, "SMESH", "outline_color" );
- addPreference( tr( "PREF_BACKFACE" ), elemGroup, LightApp_Preferences::Color, "SMESH", "backface_color" );
addPreference( tr( "PREF_COLOR_0D" ), elemGroup, LightApp_Preferences::Color, "SMESH", "elem0d_color" );
+
+ setPreferenceProperty( ColorId, "text", tr("PREF_BACKFACE") );
+
int grpGroup = addPreference( tr( "PREF_GROUP_GROUPS" ), meshTab );
setPreferenceProperty( grpGroup, "columns", 2 );
@@ -5086,18 +5084,17 @@ void SMESHGUI::storeVisualParameters (int savePoint)
// Colors (surface:edge:)
vtkFloatingPointType r, g, b;
-
- aSmeshActor->GetSufaceColor(r, g, b);
+ int delta;
+
+ aSmeshActor->GetSufaceColor(r, g, b, delta);
QString colorStr ("surface");
colorStr += gDigitsSep; colorStr += QString::number(r);
colorStr += gDigitsSep; colorStr += QString::number(g);
colorStr += gDigitsSep; colorStr += QString::number(b);
- aSmeshActor->GetBackSufaceColor(r, g, b);
- colorStr += gDigitsSep; colorStr += "backsurface";
- colorStr += gDigitsSep; colorStr += QString::number(r);
- colorStr += gDigitsSep; colorStr += QString::number(g);
- colorStr += gDigitsSep; colorStr += QString::number(b);
+ colorStr += gDigitsSep; colorStr += "backsurface";
+ colorStr += gDigitsSep; colorStr += QString::number(delta);
+
aSmeshActor->GetEdgeColor(r, g, b);
colorStr += gDigitsSep; colorStr += "edge";
@@ -5462,17 +5459,42 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
// Colors
else if (paramNameStr == "Colors") {
QStringList colors = val.split(gDigitsSep, QString::SkipEmptyParts);
- if (colors.count() == 16) {
+ if (colors.count() == 16 || colors.count() == 14 ) {
if (colors[0] != "surface" || colors[4] != "backsurface" ||
- colors[8] != "edge" || colors[12] != "node") {
+ (colors[8] != "edge" && colors[6] != "edge" ) || (colors[12] != "node" && colors[10] != "node")) {
MESSAGE("Invalid order of data in Colors, must be: "
- "surface:r:g:b:backsurface:r:g:b:edge:r:g:b:node:r:g:b");
+ "surface:r:g:b:backsurface:r:g:b:edge:r:g:b:node:r:g:b or surface:r:g:b:backsurface:delta:edge:r:g:b:node:r:g:b");
}
else {
- aSmeshActor->SetSufaceColor(colors[1].toFloat(), colors[2].toFloat(), colors[3].toFloat());
- aSmeshActor->SetBackSufaceColor(colors[5].toFloat(), colors[6].toFloat(), colors[7].toFloat());
- aSmeshActor->SetEdgeColor(colors[9].toFloat(), colors[10].toFloat(), colors[11].toFloat());
- aSmeshActor->SetNodeColor(colors[13].toFloat(), colors[14].toFloat(), colors[15].toFloat());
+ int delta = 0;
+ float er,eg,eb;
+ float nr,ng,nb;
+ //Old case backsurface color is independent
+ if( colors.count() == 16 ) {
+ QColor ffc;
+ SMESH::GetColor( "SMESH", "fill_color", ffc, delta, "0,170,255|-100" ) ;
+ er = colors[9].toFloat();
+ eg = colors[10].toFloat();
+ eb = colors[11].toFloat();
+
+ nr = colors[13].toFloat();
+ ng = colors[14].toFloat();
+ nb = colors[15].toFloat();
+ } else {
+ //New case backsurface color depends on surface color
+ delta = colors[5].toInt();
+
+ er = colors[7].toFloat();
+ eg = colors[8].toFloat();
+ eb = colors[9].toFloat();
+
+ nr = colors[11].toFloat();
+ ng = colors[12].toFloat();
+ nb = colors[13].toFloat();
+ }
+ aSmeshActor->SetSufaceColor(colors[1].toFloat(), colors[2].toFloat(), colors[3].toFloat(), delta);
+ aSmeshActor->SetEdgeColor(er,eg,eb);
+ aSmeshActor->SetNodeColor(nr,ng,nb);
}
}
}
diff --git a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx
index d61b9397f..7e40421f1 100644
--- a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx
+++ b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx
@@ -1121,7 +1121,13 @@ bool SMESHGUI_GroupDlg::onApply()
case 0: anActor->SetNodeColor( aColor.R, aColor.G, aColor.B ); break;
case 1: anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B ); break;
case 2:
- case 3: anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B ); break;
+ case 3:
+ {
+ QColor c;
+ int delta;
+ SMESH::GetColor("SMESH", "fill_color", c , delta, "0,170,255|-100");
+ anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B, delta ); break;
+ }
}
}
}
diff --git a/src/SMESHGUI/SMESHGUI_Preferences_ColorDlg.cxx b/src/SMESHGUI/SMESHGUI_Preferences_ColorDlg.cxx
index f035c5699..e411e7049 100644
--- a/src/SMESHGUI/SMESHGUI_Preferences_ColorDlg.cxx
+++ b/src/SMESHGUI/SMESHGUI_Preferences_ColorDlg.cxx
@@ -80,11 +80,10 @@ SMESHGUI_Preferences_ColorDlg::SMESHGUI_Preferences_ColorDlg( SMESHGUI* theModul
ButtonGroup1Layout->setSpacing( SPACING );
ButtonGroup1Layout->setMargin( MARGIN );
- QLabel* TextLabel_Fill = new QLabel( tr( "Fill" ), ButtonGroup1 );
- btnFillColor = new QtxColorButton( ButtonGroup1 );
+ QLabel* TextLabel_Fill = new QLabel( tr( "Surface color" ), ButtonGroup1 );
- QLabel* TextLabel_BackFace = new QLabel( tr( "Back Face" ), ButtonGroup1 );
- btnBackFaceColor = new QtxColorButton( ButtonGroup1 );
+ toolSurfColor = new QtxBiColorTool(ButtonGroup1);
+ toolSurfColor->setText("Back surface color");
QLabel* TextLabel_Outine = new QLabel( tr( "Outline" ), ButtonGroup1 );
btnOutlineColor = new QtxColorButton( ButtonGroup1 );
@@ -117,9 +116,7 @@ SMESHGUI_Preferences_ColorDlg::SMESHGUI_Preferences_ColorDlg( SMESHGUI* theModul
SpinBox_Shrink->setButtonSymbols( QSpinBox::PlusMinus );
ButtonGroup1Layout->addWidget( TextLabel_Fill, 0, 0 );
- ButtonGroup1Layout->addWidget( btnFillColor, 0, 1 );
- ButtonGroup1Layout->addWidget( TextLabel_BackFace, 0, 2 );
- ButtonGroup1Layout->addWidget( btnBackFaceColor, 0, 3 );
+ ButtonGroup1Layout->addWidget( toolSurfColor, 0, 1, 1, 3 );
ButtonGroup1Layout->addWidget( TextLabel_Outine, 1, 0 );
ButtonGroup1Layout->addWidget( btnOutlineColor, 1, 1 );
ButtonGroup1Layout->addWidget( TextLabel_0DElements_Color, 1, 2 );
@@ -309,10 +306,9 @@ void SMESHGUI_Preferences_ColorDlg::ActivateThisDialog()
void SMESHGUI_Preferences_ColorDlg::SetColor( int type, const QColor& color )
{
switch ( type ) {
- case 1 : btnFillColor->setColor( color ); break; // fill
+ case 1 : toolSurfColor->setMainColor( color ); break; // fill
case 2 : btnOutlineColor->setColor( color ); break; // outline
case 3 : btnNodeColor->setColor( color ); break; // node
- case 4 : btnBackFaceColor->setColor( color ); break; // back face
case 5 : btn0DElementsColor->setColor( color ); break; // 0d elements
case 6 : btnOrientationColor->setColor( color ); break; // orientation of faces
default: break;
@@ -327,10 +323,9 @@ QColor SMESHGUI_Preferences_ColorDlg::GetColor( int type )
{
QColor color;
switch ( type ) {
- case 1 : color = btnFillColor->color(); break; // fill
+ case 1 : color = toolSurfColor->mainColor(); break; // fill
case 2 : color = btnOutlineColor->color(); break; // outline
case 3 : color = btnNodeColor->color(); break; // node
- case 4 : color = btnBackFaceColor->color(); break; // back face
case 5 : color = btn0DElementsColor->color(); break; // 0d elements
case 6 : color = btnOrientationColor->color(); break; // orientation of faces
default: break;
@@ -484,6 +479,23 @@ int SMESHGUI_Preferences_ColorDlg::getCustomMarkerID() const
return MarkerWidget->getCustomMarkerID();
}
+//=================================================================================
+// function : SetDeltaBrightness(int)
+// purpose :
+//=================================================================================
+void SMESHGUI_Preferences_ColorDlg::SetDeltaBrightness(int delta)
+{
+ toolSurfColor->setDelta(delta);
+}
+//=================================================================================
+// function : GetDeltaBrightness()
+// purpose :
+//=================================================================================
+int SMESHGUI_Preferences_ColorDlg::GetDeltaBrightness()
+{
+ return toolSurfColor->delta();
+}
+
//=================================================================================
// function : keyPressEvent()
// purpose :
diff --git a/src/SMESHGUI/SMESHGUI_Preferences_ColorDlg.h b/src/SMESHGUI/SMESHGUI_Preferences_ColorDlg.h
index e34a9ed81..05eef6924 100644
--- a/src/SMESHGUI/SMESHGUI_Preferences_ColorDlg.h
+++ b/src/SMESHGUI/SMESHGUI_Preferences_ColorDlg.h
@@ -32,6 +32,7 @@
// SALOME GUI includes
#include
+#include
// Qt includes
#include
@@ -63,6 +64,9 @@ public:
void setCustomMarkerMap( VTK::MarkerMap );
VTK::MarkerMap getCustomMarkerMap();
+ void SetDeltaBrightness(int);
+ int GetDeltaBrightness();
+
void setStandardMarker( VTK::MarkerType, VTK::MarkerScale );
void setCustomMarker( int );
VTK::MarkerType getMarkerType() const;
@@ -82,9 +86,8 @@ private slots:
private:
SMESHGUI* mySMESHGUI;
-
- QtxColorButton* btnFillColor;
- QtxColorButton* btnBackFaceColor;
+
+ QtxBiColorTool* toolSurfColor;
QtxColorButton* btnOutlineColor;
QtxColorButton* btn0DElementsColor;
SalomeApp_IntSpinBox* SpinBox_0DElements_Size;
diff --git a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx
index 11b6204b0..46e7e5c96 100644
--- a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx
+++ b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx
@@ -610,14 +610,14 @@ namespace SMESH
SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( SMESH::SObjectToObject( aSObj ));
if(!CORBA::is_nil(aGroup) && anActor)
{
+ QColor c;int delta;
+ SMESH::GetColor( "SMESH", "fill_color", c, delta, "0,170,255|-100" );
SALOMEDS::Color aColor = aGroup->GetColor();
- if( !( aColor.R > 0 || aColor.G > 0 || aColor.B > 0 ) )
+ if( !( aColor.R > 0 || aColor.G > 0 || aColor.B > 0 ))
{
- int r = 0, g = 0, b = 0;
- SMESH::GetColor( "SMESH", "fill_color", r, g, b, QColor( 0, 170, 255 ) );
- aColor.R = (float)r / 255.0;
- aColor.G = (float)g / 255.0;
- aColor.B = (float)b / 255.0;
+ aColor.R = (float)c.red() / 255.0;
+ aColor.G = (float)c.green() / 255.0;
+ aColor.B = (float)c.blue() / 255.0;
aGroup->SetColor( aColor );
}
if( aGroup->GetType() == SMESH::NODE )
@@ -627,7 +627,7 @@ namespace SMESH
else if( aGroup->GetType() == SMESH::ELEM0D )
anActor->Set0DColor( aColor.R, aColor.G, aColor.B );
else
- anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B );
+ anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B, delta );
}
}
}
diff --git a/src/SMESHGUI/SMESH_msg_en.ts b/src/SMESHGUI/SMESH_msg_en.ts
index 746685cee..60db88cc7 100644
--- a/src/SMESHGUI/SMESH_msg_en.ts
+++ b/src/SMESHGUI/SMESH_msg_en.ts
@@ -3550,7 +3550,7 @@ Please, create VTK viewer and try again
PREF_BACKFACE
- Back face
+ Back surface color
PREF_COLOR
@@ -3594,7 +3594,7 @@ Please, create VTK viewer and try again
PREF_FILL
- Fill
+ Surface color
PREF_NOTIFY_MODE