From e9b9d285aca8fdf80e017f02cb58154ffc121994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Tr=C3=B6ger?= Date: Wed, 16 Mar 2016 17:29:09 +0100 Subject: [PATCH] PartDesign: Unify datum and shapebuilder visuals --- src/Mod/PartDesign/Gui/ViewProviderDatum.cpp | 2 ++ .../PartDesign/Gui/ViewProviderShapeBinder.cpp | 16 +++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/Mod/PartDesign/Gui/ViewProviderDatum.cpp b/src/Mod/PartDesign/Gui/ViewProviderDatum.cpp index 5a3f262e0..54d26aba1 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderDatum.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderDatum.cpp @@ -88,6 +88,8 @@ ViewProviderDatum::ViewProviderDatum() pPickStyle = new SoPickStyle(); pPickStyle->ref(); + DisplayMode.setStatus(App::Property::Hidden, true); + // set default color for datums (golden yellow with 60% transparency) ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath ( "User parameter:BaseApp/Preferences/Mod/PartDesign"); diff --git a/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp b/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp index bcf700165..d50254d4d 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp @@ -57,13 +57,19 @@ ViewProviderShapeBinder::ViewProviderShapeBinder() LineWidth.setStatus(App::Property::Hidden, true); PointColor.setStatus(App::Property::Hidden, true); PointSize.setStatus(App::Property::Hidden, true); - ShapeColor.setStatus(App::Property::Hidden, true); - Transparency.setStatus(App::Property::Hidden, true); + DisplayMode.setStatus(App::Property::Hidden, true); //get the datum coloring sheme - ShapeColor.setValue(App::Color(0.9f, 0.9f, 0.13f, 0.5f)); - LineColor.setValue(App::Color(0.9f, 0.9f, 0.13f, 0.5f)); - PointColor.setValue(App::Color(0.9f, 0.9f, 0.13f, 0.5f)); + // set default color for datums (golden yellow with 60% transparency) + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath ( + "User parameter:BaseApp/Preferences/Mod/PartDesign"); + unsigned long shcol = hGrp->GetUnsigned ( "DefaultDatumColor", 0xFFD70099 ); + App::Color col ( (uint32_t) shcol ); + + ShapeColor.setValue(col); + LineColor.setValue(col); + PointColor.setValue(col); + Transparency.setValue(60); LineWidth.setValue(1); }