forked from qt-creator/qt-creator
Fixed the alignment of the line/column number label
This depended on a stretch that was removed. Instead, make the stretch factor of the stretch 0 and make sure that the method boxes used by the CppEditor and ScriptEditor take all its space. Reviewed-by: con
This commit is contained in:
@@ -275,7 +275,8 @@ void CPPEditor::createToolBar(CPPEditorEditable *editable)
|
|||||||
|
|
||||||
QToolBar *toolBar = editable->toolBar();
|
QToolBar *toolBar = editable->toolBar();
|
||||||
QList<QAction*> actions = toolBar->actions();
|
QList<QAction*> actions = toolBar->actions();
|
||||||
toolBar->insertWidget(actions.first(), m_methodCombo);
|
QWidget *w = toolBar->widgetForAction(actions.first());
|
||||||
|
static_cast<QHBoxLayout*>(w->layout())->insertWidget(0, m_methodCombo, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int CPPEditor::previousBlockState(QTextBlock block) const
|
int CPPEditor::previousBlockState(QTextBlock block) const
|
||||||
|
|||||||
@@ -52,8 +52,9 @@
|
|||||||
#include <QtCore/QTimer>
|
#include <QtCore/QTimer>
|
||||||
#include <QtCore/QtDebug>
|
#include <QtCore/QtDebug>
|
||||||
|
|
||||||
#include <QtGui/QMenu>
|
|
||||||
#include <QtGui/QComboBox>
|
#include <QtGui/QComboBox>
|
||||||
|
#include <QtGui/QHBoxLayout>
|
||||||
|
#include <QtGui/QMenu>
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
UPDATE_DOCUMENT_DEFAULT_INTERVAL = 100
|
UPDATE_DOCUMENT_DEFAULT_INTERVAL = 100
|
||||||
@@ -386,7 +387,8 @@ void ScriptEditor::createToolBar(ScriptEditorEditable *editable)
|
|||||||
QToolBar *toolBar = editable->toolBar();
|
QToolBar *toolBar = editable->toolBar();
|
||||||
|
|
||||||
QList<QAction*> actions = toolBar->actions();
|
QList<QAction*> actions = toolBar->actions();
|
||||||
toolBar->insertWidget(actions.first(), m_methodCombo);
|
QWidget *w = toolBar->widgetForAction(actions.first());
|
||||||
|
static_cast<QHBoxLayout*>(w->layout())->insertWidget(0, m_methodCombo, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptEditor::contextMenuEvent(QContextMenuEvent *e)
|
void ScriptEditor::contextMenuEvent(QContextMenuEvent *e)
|
||||||
|
|||||||
@@ -4096,6 +4096,7 @@ BaseTextEditorEditable::BaseTextEditorEditable(BaseTextEditor *editor)
|
|||||||
QWidget *w = new QWidget;
|
QWidget *w = new QWidget;
|
||||||
l->setMargin(0);
|
l->setMargin(0);
|
||||||
l->setContentsMargins(5, 0, 5, 0);
|
l->setContentsMargins(5, 0, 5, 0);
|
||||||
|
l->addStretch(0);
|
||||||
l->addWidget(m_cursorPositionLabel);
|
l->addWidget(m_cursorPositionLabel);
|
||||||
w->setLayout(l);
|
w->setLayout(l);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user