forked from qt-creator/qt-creator
Have the editor list combo adjust size to contents
Now the box will grow larger when files with long filenames are opened.
This commit is contained in:
@@ -79,6 +79,7 @@ StackedEditorGroup::StackedEditorGroup(QWidget *parent) :
|
|||||||
tl->setMargin(0);
|
tl->setMargin(0);
|
||||||
{
|
{
|
||||||
m_editorList->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
m_editorList->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||||
|
m_editorList->setSizeAdjustPolicy(QComboBox::AdjustToContents);
|
||||||
m_editorList->setMinimumContentsLength(20);
|
m_editorList->setMinimumContentsLength(20);
|
||||||
m_proxyModel.setSourceModel(model());
|
m_proxyModel.setSourceModel(model());
|
||||||
m_proxyModel.sort(0);
|
m_proxyModel.sort(0);
|
||||||
@@ -296,9 +297,9 @@ void StackedEditorGroup::setCurrentEditor(IEditor *editor)
|
|||||||
|
|
||||||
void StackedEditorGroup::checkEditorStatus()
|
void StackedEditorGroup::checkEditorStatus()
|
||||||
{
|
{
|
||||||
IEditor *editor = qobject_cast<IEditor *>(sender());
|
IEditor *editor = qobject_cast<IEditor *>(sender());
|
||||||
if (editor == currentEditor())
|
if (editor == currentEditor())
|
||||||
updateEditorStatus(editor);
|
updateEditorStatus(editor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StackedEditorGroup::updateEditorStatus(IEditor *editor)
|
void StackedEditorGroup::updateEditorStatus(IEditor *editor)
|
||||||
|
|||||||
Reference in New Issue
Block a user