Move "Sync Horiz Scroll Bars" corner widget to the toolbar

Change-Id: Ie97ae07b02499b4d8d80e006aa77ca3b802f39b3
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
jkobus
2013-06-03 12:32:07 +02:00
committed by Jarek Kobus
parent 36bec480ae
commit aa0533c969
3 changed files with 13 additions and 12 deletions

View File

@@ -33,6 +33,8 @@
#include "diffeditorconstants.h"
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
#include <QCoreApplication>
#include <QToolButton>
#include <QSpinBox>
@@ -153,6 +155,15 @@ QWidget *DiffEditor::toolBar()
m_editorWidget, SLOT(setContextLinesNumber(int)));
m_toolWidget->addWidget(contextSpinBox);
QToolButton *toggleSync = new QToolButton(m_toolWidget);
toggleSync->setIcon(QIcon(QLatin1String(Core::Constants::ICON_LINK)));
toggleSync->setCheckable(true);
toggleSync->setChecked(true);
toggleSync->setToolTip(tr("Synchronize Horizontal Scroll Bars"));
connect(toggleSync, SIGNAL(clicked(bool)),
m_editorWidget, SLOT(setHorizontalScrollBarSynchronization(bool)));
m_toolWidget->addWidget(toggleSync);
return m_toolWidget;
}