Gui: Remove references to the Addon Manager if no Std_AddonMgr (#23167)
* Gui: Remove references to the Addon Manager if no Std_AddonMgr * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Gui: Switch to disabling controls rather than hiding --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -236,8 +236,13 @@ bool ThemeSelectorWidget::eventFilter(QObject* object, QEvent* event)
|
||||
void ThemeSelectorWidget::retranslateUi()
|
||||
{
|
||||
_titleLabel->setText(QLatin1String("<h2>") + tr("Theme") + QLatin1String("</h2>"));
|
||||
_descriptionLabel->setText(tr("Looking for more themes? You can obtain them using "
|
||||
"<a href=\"freecad:Std_AddonMgr\">Addon Manager</a>."));
|
||||
if (Gui::Application::Instance->commandManager().getCommandByName("Std_AddonMgr")) {
|
||||
_descriptionLabel->setText(tr("Looking for more themes? You can obtain them using "
|
||||
"<a href=\"freecad:Std_AddonMgr\">Addon Manager</a>."));
|
||||
}
|
||||
else {
|
||||
_descriptionLabel->hide();
|
||||
}
|
||||
_buttons[static_cast<int>(Theme::Dark)]->setText(tr("FreeCAD Dark", "Visual theme name"));
|
||||
_buttons[static_cast<int>(Theme::Light)]->setText(tr("FreeCAD Light", "Visual theme name"));
|
||||
_buttons[static_cast<int>(Theme::Classic)]->setText(tr("FreeCAD Classic", "Visual theme name"));
|
||||
|
||||
Reference in New Issue
Block a user