Commit 1ea114b4 authored by Jens Bache-Wiig's avatar Jens Bache-Wiig
Browse files

Make the panel action sunken when panel is open

parent 41885a19
...@@ -106,7 +106,7 @@ void FancyToolButton::paintEvent(QPaintEvent *event) ...@@ -106,7 +106,7 @@ void FancyToolButton::paintEvent(QPaintEvent *event)
painter.restore(); painter.restore();
} else } else
#endif #endif
if (isDown() || isChecked()) { if (isDown() || isChecked()) {
painter.save(); painter.save();
QLinearGradient grad(rect().topLeft(), rect().topRight()); QLinearGradient grad(rect().topLeft(), rect().topRight());
......
...@@ -294,7 +294,6 @@ bool MiniTargetWidget::hasBuildConfiguration() const ...@@ -294,7 +294,6 @@ bool MiniTargetWidget::hasBuildConfiguration() const
return (m_target->buildConfigurationFactory() != 0); return (m_target->buildConfigurationFactory() != 0);
} }
MiniProjectTargetSelector::MiniProjectTargetSelector(QAction *targetSelectorAction, QWidget *parent) : MiniProjectTargetSelector::MiniProjectTargetSelector(QAction *targetSelectorAction, QWidget *parent) :
QWidget(parent), m_projectAction(targetSelectorAction) QWidget(parent), m_projectAction(targetSelectorAction)
{ {
...@@ -352,6 +351,8 @@ void MiniProjectTargetSelector::setVisible(bool visible) ...@@ -352,6 +351,8 @@ void MiniProjectTargetSelector::setVisible(bool visible)
QWidget::setVisible(visible); QWidget::setVisible(visible);
if (m_widgetStack->currentWidget()) if (m_widgetStack->currentWidget())
m_widgetStack->currentWidget()->setFocus(); m_widgetStack->currentWidget()->setFocus();
m_projectAction->setChecked(visible);
} }
void MiniProjectTargetSelector::addProject(ProjectExplorer::Project* project) void MiniProjectTargetSelector::addProject(ProjectExplorer::Project* project)
......
...@@ -695,6 +695,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -695,6 +695,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
// target selector // target selector
d->m_projectSelectorAction = new QAction(this); d->m_projectSelectorAction = new QAction(this);
d->m_projectSelectorAction->setCheckable(true);
d->m_projectSelectorAction->setEnabled(false); d->m_projectSelectorAction->setEnabled(false);
QWidget *mainWindow = Core::ICore::instance()->mainWindow(); QWidget *mainWindow = Core::ICore::instance()->mainWindow();
d->m_targetSelector = new Internal::MiniProjectTargetSelector(d->m_projectSelectorAction, mainWindow); d->m_targetSelector = new Internal::MiniProjectTargetSelector(d->m_projectSelectorAction, mainWindow);
......
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