Avoid resizing of document dropdown

When e.g. splitting while an editor with a long display name is open,
the new editor area would start with a huge document combo box.
Fix it to the minimum contents length.

Change-Id: Ic58e477cc8f9a91e7fa138de63ed7df80487a5fe
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Eike Ziller
2016-11-24 14:31:43 +01:00
parent 08c9055ab0
commit be2697f818

View File

@@ -144,6 +144,7 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
d->m_editorList->setProperty("notelideasterisk", true);
d->m_editorList->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
d->m_editorList->setMinimumContentsLength(20);
d->m_editorList->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
d->m_editorList->setModel(DocumentModel::model());
d->m_editorList->setMaxVisibleItems(40);
d->m_editorList->setContextMenuPolicy(Qt::CustomContextMenu);