From 3d179d27deb98331159ef06ba732adc963779f4d Mon Sep 17 00:00:00 2001 From: bdieterm <119257544+bdieterm@users.noreply.github.com> Date: Sat, 8 Jul 2023 22:45:38 +0200 Subject: [PATCH] set toolbar icon size when starting FreeCAD GUI from Python import --- src/Main/FreeCADGuiPy.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Main/FreeCADGuiPy.cpp b/src/Main/FreeCADGuiPy.cpp index a449fc0c97..d93d87924e 100644 --- a/src/Main/FreeCADGuiPy.cpp +++ b/src/Main/FreeCADGuiPy.cpp @@ -305,6 +305,12 @@ QWidget* setupMainWindow() mw->setWindowTitle(QString::fromLatin1(App::Application::Config()["ExeName"].c_str())); } + // set toolbar icon size + ParameterGrp::handle hGrp = Gui::WindowParameter::getDefaultParameter()->GetGroup("General"); + int size = hGrp->GetInt("ToolbarIconSize", 0); + if (size >= 16) // must not be lower than this + mw->setIconSize(QSize(size,size)); + if (!SoDB::isInitialized()) { // init the Inventor subsystem SoDB::init();