Skip to content

Commit

Permalink
fix the range of maxPanelsOpened
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Apr 9, 2021
1 parent a689177 commit 0122f92
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Engine/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,8 @@ Settings::initializeKnobsUserInterface()
"held by the properties dock at the same time."
"The special value of 0 indicates there can be an unlimited number of panels opened.") );
_maxPanelsOpened->disableSlider();
_maxPanelsOpened->setMinimum(1);
_maxPanelsOpened->setMaximum(100);
_maxPanelsOpened->setMinimum(0);
_maxPanelsOpened->setMaximum(99);
_uiPage->addKnob(_maxPanelsOpened);

_useCursorPositionIncrements = AppManager::createKnob<KnobBool>( this, tr("Value increments based on cursor position") );
Expand Down
9 changes: 6 additions & 3 deletions Gui/GuiPrivate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,12 @@ GuiPrivate::createPropertiesBinGui()
QObject::connect( _minimizeAllPanelsButtons, SIGNAL(clicked(bool)), _gui, SLOT(minimizeMaximizeAllPanels(bool)) );

_maxPanelsOpenedSpinBox = new SpinBox(propertiesAreaButtonsContainer);
_maxPanelsOpenedSpinBox->setMaximumSize(smallButtonSize);
_maxPanelsOpenedSpinBox->setMinimum(1);
_maxPanelsOpenedSpinBox->setMaximum(100);
const int fontSize = appPTR->getAppFontSize();
const QSize maxPanelsOpenedSpinBoxSize(TO_DPIX(std::max(NATRON_SMALL_BUTTON_SIZE, 2 * fontSize)),
TO_DPIY(std::max(NATRON_SMALL_BUTTON_SIZE, fontSize * 3 / 2)));
_maxPanelsOpenedSpinBox->setFixedSize(maxPanelsOpenedSpinBoxSize);
_maxPanelsOpenedSpinBox->setMinimum(0);
_maxPanelsOpenedSpinBox->setMaximum(99);
_maxPanelsOpenedSpinBox->setToolTip( NATRON_NAMESPACE::convertFromPlainText(tr("Set the maximum of panels that can be opened at the same time "
"in the properties bin pane. The special value of 0 indicates "
"that an unlimited number of panels can be opened."),
Expand Down

0 comments on commit 0122f92

Please sign in to comment.