forked from qt-creator/qt-creator
Core: Set FindToolBar's prev/next buttons disabled on document close
If the current document closes, all items of the find toolbar (except "Advanced...") are supposed to be disabled. The previous and next buttons however remained enabled, which is now fixed with this change. Change-Id: I33f978f23970280f04fb4f6237b733d5109043c1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -421,7 +421,9 @@ void FindToolBar::updateToolBar()
|
||||
m_ui.findLabel->setVisible(showAllControls);
|
||||
m_ui.findEdit->setEnabled(enabled);
|
||||
m_ui.findEdit->setPlaceholderText(showAllControls ? QString() : tr("Search for..."));
|
||||
m_ui.findPreviousButton->setEnabled(enabled);
|
||||
m_ui.findPreviousButton->setVisible(showAllControls);
|
||||
m_ui.findNextButton->setEnabled(enabled);
|
||||
m_ui.findNextButton->setVisible(showAllControls);
|
||||
m_ui.horizontalSpacer->changeSize((showAllControls ? FINDBUTTON_SPACER_WIDTH : 0), 0,
|
||||
QSizePolicy::Expanding, QSizePolicy::Ignored);
|
||||
|
Reference in New Issue
Block a user