Fixed layout issues in some editor toolbars

Cleaned up some hacky code in the process.

Done-with: Tobias Hunger
This commit is contained in:
Thorbjørn Lindeijer
2011-02-25 15:58:02 +01:00
parent b316970101
commit 70b70770a4
8 changed files with 50 additions and 55 deletions

View File

@@ -274,7 +274,7 @@ TextEditor::BaseTextEditor *GLSLTextEditorWidget::createEditor()
return editable;
}
void GLSLTextEditorWidget::createToolBar(GLSLEditorEditable *editable)
void GLSLTextEditorWidget::createToolBar(GLSLEditorEditable *editor)
{
m_outlineCombo = new QComboBox;
m_outlineCombo->setMinimumContentsLength(22);
@@ -295,10 +295,7 @@ void GLSLTextEditorWidget::createToolBar(GLSLEditorEditable *editable)
policy.setHorizontalPolicy(QSizePolicy::Expanding);
m_outlineCombo->setSizePolicy(policy);
QToolBar *toolBar = static_cast<QToolBar*>(editable->toolBar());
QList<QAction*> actions = toolBar->actions();
toolBar->insertWidget(actions.first(), m_outlineCombo);
editor->insertExtraToolBarWidget(TextEditor::BaseTextEditor::Left, m_outlineCombo);
}
bool GLSLTextEditorWidget::event(QEvent *e)