forked from qt-creator/qt-creator
Improve behavior of cpp editor tool bar
The parse context drop down was taking a content based, fixed amount of space in the editor tool bar, without being shrinkable. That was especially bad if you have a long project / target name. When working with a small window / split, the outline drop down would be dropped from the tool bar. This patch makes the parse context drop down shrinkable (with a small minimum size), and gives the outline drop down a slightly higher priority for getting tool bar space. Task-number: QTCREATORBUG-19386 Change-Id: I87e3ee2e411a43b1f398ffd24fe5608e4df02af6 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -112,6 +112,7 @@ CppEditorOutline::CppEditorOutline(TextEditor::TextEditorWidget *editorWidget)
|
||||
m_combo->setMinimumContentsLength(22);
|
||||
QSizePolicy policy = m_combo->sizePolicy();
|
||||
policy.setHorizontalPolicy(QSizePolicy::Expanding);
|
||||
policy.setHorizontalStretch(2);
|
||||
m_combo->setSizePolicy(policy);
|
||||
m_combo->setMaxVisibleItems(40);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user