diff --git a/src/Mod/Sketcher/Gui/SketcherSettings.cpp b/src/Mod/Sketcher/Gui/SketcherSettings.cpp
index adf0b74a4f66..127a174f5c55 100644
--- a/src/Mod/Sketcher/Gui/SketcherSettings.cpp
+++ b/src/Mod/Sketcher/Gui/SketcherSettings.cpp
@@ -41,6 +41,14 @@ SketcherSettings::SketcherSettings(QWidget* parent)
ui->setupUi(this);
form = new SketcherGeneralWidget(ui->groupBox);
ui->gridLayout->addWidget(form, 1, 0, 1, 1);
+
+ // Don't need them at the moment
+ ui->label_16->hide();
+ ui->SketcherDatumWidth->hide();
+ ui->label_12->hide();
+ ui->DefaultSketcherVertexWidth->hide();
+ ui->label_13->hide();
+ ui->DefaultSketcherLineWidth->hide();
}
/**
@@ -60,6 +68,7 @@ void SketcherSettings::saveSettings()
ui->EditedEdgeColor->onSave();
ui->EditedVertexColor->onSave();
ui->ConstructionColor->onSave();
+ ui->ExternalColor->onSave();
ui->FullyConstrainedColor->onSave();
ui->ConstrainedColor->onSave();
@@ -84,6 +93,7 @@ void SketcherSettings::loadSettings()
ui->EditedEdgeColor->onRestore();
ui->EditedVertexColor->onRestore();
ui->ConstructionColor->onRestore();
+ ui->ExternalColor->onRestore();
ui->FullyConstrainedColor->onRestore();
ui->ConstrainedColor->onRestore();
diff --git a/src/Mod/Sketcher/Gui/SketcherSettings.ui b/src/Mod/Sketcher/Gui/SketcherSettings.ui
index 73cc32f65c97..2824c82ca8a6 100644
--- a/src/Mod/Sketcher/Gui/SketcherSettings.ui
+++ b/src/Mod/Sketcher/Gui/SketcherSettings.ui
@@ -188,6 +188,39 @@
-
+
+
+
+ 182
+ 0
+
+
+
+ External geometry
+
+
+
+ -
+
+
+ The color of external geometry in edit mode
+
+
+
+ 204
+ 51
+ 115
+
+
+
+ ExternalColor
+
+
+ View
+
+
+
+ -
@@ -200,7 +233,7 @@
- -
+
-
The color of fully constrained geometry in edit mode
@@ -220,7 +253,7 @@
- -
+
-
@@ -233,27 +266,27 @@
- -
+
-
The color of fully constrained geometry in edit mode
- 0
- 255
+ 255
+ 38
0
- ConstrainedColor
+ ConstrainedIcoColor
View
- -
+
-
@@ -266,27 +299,27 @@
- -
+
-
The color of fully constrained geometry in edit mode
- 0
- 255
+ 255
+ 38
0
- DatumColor
+ ConstrainedDimColor
View
- -
+
-
@@ -299,7 +332,7 @@
- -
+
-
The default line thickness for new shapes
@@ -321,7 +354,7 @@
- -
+
-
@@ -334,7 +367,7 @@
- -
+
-
The default line thickness for new shapes
@@ -356,7 +389,7 @@
- -
+
-
@@ -369,7 +402,7 @@
- -
+
-
The default line thickness for new shapes
@@ -391,7 +424,7 @@
- -
+
-
@@ -404,7 +437,7 @@
- -
+
-
diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp
index aa3fda98b03d..a85d5a3140ab 100644
--- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp
+++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp
@@ -242,6 +242,23 @@ ViewProviderSketch::ViewProviderSketch()
xInit=0;
yInit=0;
relative=false;
+
+ unsigned long color;
+ ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View");
+
+ // edge color
+ App::Color edgeColor = LineColor.getValue();
+ color = (unsigned long)(edgeColor.getPackedValue());
+ color = hGrp->GetUnsigned("SketchEdgeColor", color);
+ edgeColor.setPackedValue((uint32_t)color);
+ LineColor.setValue(edgeColor);
+
+ // vertex color
+ App::Color vertexColor = PointColor.getValue();
+ color = (unsigned long)(vertexColor.getPackedValue());
+ color = hGrp->GetUnsigned("SketchVertexColor", color);
+ vertexColor.setPackedValue((uint32_t)color);
+ PointColor.setValue(vertexColor);
}
ViewProviderSketch::~ViewProviderSketch()
@@ -2972,10 +2989,18 @@ bool ViewProviderSketch::setEdit(int ModNum)
color = (unsigned long)(FullyConstrainedColor.getPackedValue());
color = hGrp->GetUnsigned("FullyConstrainedColor", color);
FullyConstrainedColor.setPackedValue((uint32_t)color, transparency);
- // constraints dimensions, icons and external geometry colors are hard coded
- // ConstrDimColor;
- // ConstrIcoColor;
- // CurveExternalColor;
+ // set the constraint dimension color
+ color = (unsigned long)(ConstrDimColor.getPackedValue());
+ color = hGrp->GetUnsigned("ConstrainedDimColor", color);
+ ConstrDimColor.setPackedValue((uint32_t)color, transparency);
+ // set the constraint color
+ color = (unsigned long)(ConstrIcoColor.getPackedValue());
+ color = hGrp->GetUnsigned("ConstrainedIcoColor", color);
+ ConstrIcoColor.setPackedValue((uint32_t)color, transparency);
+ // set the external geometry color
+ color = (unsigned long)(CurveExternalColor.getPackedValue());
+ color = hGrp->GetUnsigned("ExternalColor", color);
+ CurveExternalColor.setPackedValue((uint32_t)color, transparency);
// set the highlight color
unsigned long highlight = (unsigned long)(PreselectColor.getPackedValue());