Commit 897ea412 authored by Eike Ziller's avatar Eike Ziller Committed by Jarek Kobus
Browse files

DiffEditor: Fix context lines spin box layout.



Work around a regression in Qt 5 (QTBUG-31538)
Also prefer setting left+right margins instead of all margins for the
label.

Change-Id: I108de101239145295d37002aa989a959d8041c55
Reviewed-by: default avatarJarek Kobus <jaroslaw.kobus@digia.com>
parent aa0533c9
......@@ -144,13 +144,14 @@ QWidget *DiffEditor::toolBar()
QLabel *contextLabel = new QLabel(m_toolWidget);
contextLabel->setText(tr("Context Lines:"));
contextLabel->setMargin(6);
contextLabel->setContentsMargins(6, 0, 6, 0);
m_toolWidget->addWidget(contextLabel);
QSpinBox *contextSpinBox = new QSpinBox(m_toolWidget);
contextSpinBox->setRange(-1, 100);
contextSpinBox->setValue(3);
contextSpinBox->setFrame(false);
contextSpinBox->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding); // Mac Qt5
connect(contextSpinBox, SIGNAL(valueChanged(int)),
m_editorWidget, SLOT(setContextLinesNumber(int)));
m_toolWidget->addWidget(contextSpinBox);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment