Make "close view" buttons more consistent

Use the same icons that we already use for editor splits.

Change-Id: Ice052f637968918a15b16e00a39c5dbc06948dbc
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
Eike Ziller
2015-01-19 17:07:49 +01:00
parent 642dc36ecb
commit 58feec49bf
7 changed files with 50 additions and 12 deletions

View File

@@ -80,11 +80,11 @@ SideBarWidget::SideBarWidget(SideBar *sideBar, const QString &id)
connect(m_splitAction, SIGNAL(triggered()), this, SIGNAL(splitMe()));
m_toolbar->addAction(m_splitAction);
QAction *closeAction = new QAction(tr("Close"), m_toolbar);
closeAction->setToolTip(tr("Close"));
closeAction->setIcon(QIcon(QLatin1String(Constants::ICON_BUTTON_CLOSE)));
connect(closeAction, SIGNAL(triggered()), this, SIGNAL(closeMe()));
m_toolbar->addAction(closeAction);
m_closeAction = new QAction(tr("Close"), m_toolbar);
m_closeAction->setToolTip(tr("Close"));
m_closeAction->setIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
connect(m_closeAction, SIGNAL(triggered()), this, SIGNAL(closeMe()));
m_toolbar->addAction(m_closeAction);
QVBoxLayout *lay = new QVBoxLayout();
lay->setMargin(0);
@@ -212,5 +212,10 @@ Command *SideBarWidget::command(const QString &title) const
return 0;
}
void SideBarWidget::setCloseIcon(const QIcon &icon)
{
m_closeAction->setIcon(icon);
}
} // namespace Internal
} // namespace Core