Commit 64262ee6 authored by con's avatar con
Browse files

Don't use QToolBar for output pane.

parent ee041b65
......@@ -40,6 +40,8 @@
#include <extensionsystem/pluginmanager.h>
#include <utils/styledbar.h>
#include <QtCore/QDebug>
#include <QtGui/QAction>
......@@ -163,7 +165,6 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) :
m_closeButton(new QToolButton),
m_nextAction(0),
m_prevAction(0),
m_closeAction(0),
m_lastIndex(-1),
m_outputWidgetPane(new QStackedWidget),
m_opToolBarWidgets(new QStackedWidget)
......@@ -194,12 +195,20 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) :
QVBoxLayout *mainlayout = new QVBoxLayout;
mainlayout->setSpacing(0);
mainlayout->setMargin(0);
m_toolBar = new QToolBar;
m_toolBar->addWidget(m_widgetComboBox);
m_toolBar->addWidget(m_clearButton);
m_opToolBarAction = m_toolBar->addWidget(m_opToolBarWidgets);
m_closeAction = m_toolBar->addWidget(m_closeButton);
m_toolBar = new Core::Utils::StyledBar;
QHBoxLayout *toolLayout = new QHBoxLayout(m_toolBar);
toolLayout->setMargin(0);
toolLayout->setSpacing(0);
toolLayout->addWidget(m_widgetComboBox);
toolLayout->addWidget(m_clearButton);
m_prevToolButton = new QToolButton;
m_prevToolButton->setProperty("type", QLatin1String("dockbutton"));
toolLayout->addWidget(m_prevToolButton);
m_nextToolButton = new QToolButton;
m_nextToolButton->setProperty("type", QLatin1String("dockbutton"));
toolLayout->addWidget(m_nextToolButton);
toolLayout->addWidget(m_opToolBarWidgets);
toolLayout->addWidget(m_closeButton);
mainlayout->addWidget(m_toolBar);
mainlayout->addWidget(m_outputWidgetPane, 10);
setLayout(mainlayout);
......@@ -248,11 +257,11 @@ void OutputPaneManager::init()
cmd = am->registerAction(m_prevAction, "Coreplugin.OutputPane.previtem", globalcontext);
cmd->setDefaultKeySequence(QKeySequence("Shift+F6"));
m_toolBar->insertAction(m_opToolBarAction ,cmd->action());
m_prevToolButton->setDefaultAction(cmd->action());
mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");
cmd = am->registerAction(m_nextAction, "Coreplugin.OutputPane.nextitem", globalcontext);
m_toolBar->insertAction(m_opToolBarAction, cmd->action());
m_nextToolButton->setDefaultAction(cmd->action());
cmd->setDefaultKeySequence(QKeySequence("F6"));
mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");
......@@ -492,7 +501,7 @@ void OutputPaneManager::togglePage(bool focus)
void OutputPaneManager::setCloseable(bool b)
{
m_closeAction->setVisible(b);
m_closeButton->setVisible(b);
}
bool OutputPaneManager::closeable()
......
......@@ -125,15 +125,15 @@ private:
QAction *m_nextAction;
QAction *m_prevAction;
QAction *m_closeAction;
QToolBar *m_toolBar;
QToolButton *m_prevToolButton;
QToolButton *m_nextToolButton;
QWidget *m_toolBar;
QMap<int, Core::IOutputPane*> m_pageMap;
int m_lastIndex;
QStackedWidget *m_outputWidgetPane;
QStackedWidget *m_opToolBarWidgets;
QAction *m_opToolBarAction;
QWidget *m_buttonsWidget;
QMap<int, QPushButton *> m_buttons;
QMap<QAction *, int> m_actions;
......
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