forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user