Improved font handling Navigation cube
Also adding anisotropy texture mapping for better readability on steep angles.
This commit is contained in:
committed by
Adrián Insaurralde Avalos
parent
e5f6a4edf3
commit
caac68472b
@@ -442,7 +442,6 @@ NaviCubeSettings::NaviCubeSettings(ParameterGrp::handle hGrp,
|
||||
[this](ParameterGrp*, ParameterGrp::ParamType, const char *Name, const char *) {
|
||||
parameterChanged(Name);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
NaviCubeSettings::~NaviCubeSettings()
|
||||
@@ -450,16 +449,6 @@ NaviCubeSettings::~NaviCubeSettings()
|
||||
connectParameterChanged.disconnect();
|
||||
}
|
||||
|
||||
QString NaviCubeSettings::getDefaultSansserifFont()
|
||||
{
|
||||
// "FreeCAD NaviCube" family susbtitutions are set in MainWindow::MainWindow
|
||||
QFont font(QStringLiteral("FreeCAD NaviCube"));
|
||||
font.setStyleHint(QFont::SansSerif);
|
||||
// QFontInfo is required to get the actually matched font family
|
||||
return QFontInfo(font).family();
|
||||
// return QStringLiteral("FreeCAD NaviCube");
|
||||
}
|
||||
|
||||
void NaviCubeSettings::applySettings()
|
||||
{
|
||||
parameterChanged("BaseColor");
|
||||
@@ -506,9 +495,7 @@ void NaviCubeSettings::parameterChanged(const char* Name)
|
||||
nc->setFontZoom(hGrp->GetFloat("FontZoom", 0.3));
|
||||
}
|
||||
else if (strcmp(Name, "FontString") == 0) {
|
||||
std::string font =
|
||||
hGrp->GetASCII("FontString", getDefaultSansserifFont().toStdString().c_str());
|
||||
nc->setFont(font);
|
||||
nc->setFont(hGrp->GetASCII("FontString"));
|
||||
}
|
||||
else if (strcmp(Name, "FontWeight") == 0) {
|
||||
nc->setFontWeight(hGrp->GetInt("FontWeight", 0));
|
||||
|
||||
Reference in New Issue
Block a user