ProjectExplorer: Add an "Active Project" label to Project window

Change-Id: I9036d25f9cde0849c8a2fed5b2c3ce97f1315f55
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
hjk
2016-10-13 12:09:54 +02:00
parent 669a77bac4
commit 91090f8871

View File

@@ -50,6 +50,7 @@
#include <QComboBox> #include <QComboBox>
#include <QDockWidget> #include <QDockWidget>
#include <QHeaderView> #include <QHeaderView>
#include <QLabel>
#include <QMenu> #include <QMenu>
#include <QStyledItemDelegate> #include <QStyledItemDelegate>
#include <QTimer> #include <QTimer>
@@ -483,9 +484,16 @@ ProjectWindow::ProjectWindow()
selectorView->setWindowTitle(tr("Project Selector")); selectorView->setWindowTitle(tr("Project Selector"));
selectorView->setAutoFillBackground(true); selectorView->setAutoFillBackground(true);
auto activeLabel = new QLabel(tr("Active Project"));
QFont font = activeLabel->font();
font.setBold(true);
font.setPointSizeF(font.pointSizeF() * 1.2);
activeLabel->setFont(font);
auto innerLayout = new QVBoxLayout; auto innerLayout = new QVBoxLayout;
innerLayout->setSpacing(10); innerLayout->setSpacing(10);
innerLayout->setContentsMargins(14, innerLayout->spacing(), 14, 0); innerLayout->setContentsMargins(14, innerLayout->spacing(), 14, 0);
innerLayout->addWidget(activeLabel);
innerLayout->addWidget(selectorModel->m_projectSelection); innerLayout->addWidget(selectorModel->m_projectSelection);
innerLayout->addWidget(selectorModel->m_selectorTree); innerLayout->addWidget(selectorModel->m_selectorTree);