Commit f014f3a4 authored by Jens Bache-Wiig's avatar Jens Bache-Wiig

Improve icon and label behavior for target selector

I modified the text margins, removed the inconsistent
"No project" label and made sure we fall back to
the default computer icon when no project is open.
parent 80858f81
......@@ -227,13 +227,13 @@ QSize FancyToolButton::sizeHint() const
QFontMetrics fm(boldFont);
qreal lineHeight = fm.height();
const QString projectName = defaultAction()->property("heading").toString();
buttonSize += QSizeF(0, 4);
buttonSize += QSizeF(0, 10);
if (!projectName.isEmpty())
buttonSize += QSizeF(0, lineHeight + 6);
buttonSize += QSizeF(0, lineHeight + 2);
const QString buildConfiguration = defaultAction()->property("subtitle").toString();
if (!buildConfiguration.isEmpty())
buttonSize += QSizeF(0, lineHeight + 6);
buttonSize += QSizeF(0, lineHeight + 2);
}
return buttonSize.toSize();
}
......
......@@ -550,12 +550,12 @@ void MiniProjectTargetSelector::updateAction()
{
Project *project = ProjectExplorerPlugin::instance()->startupProject();
QString projectName = tr("No Project");
QString projectName;;
QString targetName;
QString targetToolTipText;
QIcon targetIcon;
QString buildConfig;
QString runConfig;
QIcon targetIcon = style()->standardIcon(QStyle::SP_ComputerIcon);
if (project) {
projectName = project->displayName();
......
Markdown is supported
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