Commit 77f32f4c authored by finetjul's avatar finetjul
Browse files

ENH: Allow long module name into the Module Selector toolbar

Before, long names were not fitting in the fixed width pushbutton

git-svn-id: http://svn.slicer.org/Slicer4/trunk@15607 3bd1e089-480b-0410-8dfb-8563597acbee
parent 0b599b45
......@@ -88,11 +88,11 @@ void qSlicerModuleSelectorToolBarPrivate::init()
this->ModulesButton->setToolTip(QObject::tr("Select a module from the module list"));
this->ModulesButton->setMenu(this->ModulesMenu);
QStyleOptionButton opt;
this->ModulesButton->setFixedWidth(
this->ModulesButton->setMinimumWidth(
this->ModulesButton->style()->sizeFromContents(
QStyle::CT_PushButton, &opt,
this->ModulesButton->fontMetrics().size(
Qt::TextShowMnemonic, "XXXXXXXXXXXXXXXXXXXXXXXXXX"),this->ModulesButton).width());
Qt::TextShowMnemonic, "XXXXXXXXXXXXXXXXXXXXXXXXXXXX"),this->ModulesButton).width());
q->addWidget(this->ModulesButton);
// Previous button
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment