forked from qt-creator/qt-creator
Projects mode: Make plus icon dark and get rid of branch indicators
The PLUS icon was actually PLUS_TOOLBAR, so name it that way and add an actual PLUS icon. Remove the drawing of the branch indicators from the kit tree view by overriding the method that does it. Change-Id: I395e5187c1738faaee3e122b4f3f359261b514d7 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -91,8 +91,10 @@ const Icon ARROW_DOWN({
|
||||
{QLatin1String(":/utils/images/arrowdown.png"), Theme::IconsBaseColor}});
|
||||
const Icon MINUS({
|
||||
{QLatin1String(":/utils/images/minus.png"), Theme::IconsBaseColor}});
|
||||
const Icon PLUS({
|
||||
const Icon PLUS_TOOLBAR({
|
||||
{QLatin1String(":/utils/images/plus.png"), Theme::IconsBaseColor}});
|
||||
const Icon PLUS({
|
||||
{QLatin1String(":/utils/images/plus.png"), Theme::PaletteText}});
|
||||
const Icon MAGNIFIER({
|
||||
{QLatin1String(":/utils/images/magnifier.png"), Theme::PanelTextColorMid}}, Icon::Tint);
|
||||
const Icon CLEAN({
|
||||
|
||||
@@ -63,6 +63,7 @@ QTCREATOR_UTILS_EXPORT extern const Icon DARK_CLOSE;
|
||||
QTCREATOR_UTILS_EXPORT extern const Icon ARROW_UP;
|
||||
QTCREATOR_UTILS_EXPORT extern const Icon ARROW_DOWN;
|
||||
QTCREATOR_UTILS_EXPORT extern const Icon MINUS;
|
||||
QTCREATOR_UTILS_EXPORT extern const Icon PLUS_TOOLBAR;
|
||||
QTCREATOR_UTILS_EXPORT extern const Icon PLUS;
|
||||
QTCREATOR_UTILS_EXPORT extern const Icon MAGNIFIER;
|
||||
QTCREATOR_UTILS_EXPORT extern const Icon CLEAN;
|
||||
|
||||
@@ -107,7 +107,7 @@ void ImageViewer::ctor()
|
||||
{QLatin1String(":/utils/images/desktopdevicesmall.png"), Utils::Theme::IconsBaseColor}});
|
||||
d->ui_toolbar.toolButtonBackground->setIcon(backgroundIcon.icon());
|
||||
d->ui_toolbar.toolButtonOutline->setIcon(Utils::Icons::BOUNDING_RECT.icon());
|
||||
d->ui_toolbar.toolButtonZoomIn->setIcon(Utils::Icons::PLUS.icon());
|
||||
d->ui_toolbar.toolButtonZoomIn->setIcon(Utils::Icons::PLUS_TOOLBAR.icon());
|
||||
d->ui_toolbar.toolButtonZoomOut->setIcon(Utils::Icons::MINUS.icon());
|
||||
d->ui_toolbar.toolButtonFitToScreen->setIcon(Utils::Icons::ZOOM_TOOLBAR.icon());
|
||||
d->ui_toolbar.toolButtonOriginalSize->setIcon(Utils::Icons::EYE_OPEN_TOOLBAR.icon());
|
||||
|
||||
@@ -187,7 +187,7 @@ AppOutputPane::AppOutputPane() :
|
||||
this, &AppOutputPane::attachToRunControl);
|
||||
|
||||
m_zoomInButton->setToolTip(tr("Increase Font Size"));
|
||||
m_zoomInButton->setIcon(Utils::Icons::PLUS.icon());
|
||||
m_zoomInButton->setIcon(Utils::Icons::PLUS_TOOLBAR.icon());
|
||||
m_zoomInButton->setAutoRaise(true);
|
||||
|
||||
connect(m_zoomInButton, &QToolButton::clicked,
|
||||
|
||||
@@ -170,7 +170,7 @@ CompileOutputWindow::CompileOutputWindow(QAction *cancelBuildAction) :
|
||||
Utils::Icons::STOP_SMALL_TOOLBAR.icon());
|
||||
m_cancelBuildButton->setDefaultAction(cancelBuildProxyButton);
|
||||
m_zoomInButton->setToolTip(tr("Increase Font Size"));
|
||||
m_zoomInButton->setIcon(Utils::Icons::PLUS.icon());
|
||||
m_zoomInButton->setIcon(Utils::Icons::PLUS_TOOLBAR.icon());
|
||||
m_zoomOutButton->setToolTip(tr("Decrease Font Size"));
|
||||
m_zoomOutButton->setIcon(Utils::Icons::MINUS.icon());
|
||||
|
||||
|
||||
@@ -451,6 +451,12 @@ public:
|
||||
setObjectName("ProjectNavigation");
|
||||
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
}
|
||||
|
||||
// remove branch indicators
|
||||
void drawBranches(QPainter *, const QRect &, const QModelIndex &) const override
|
||||
{
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -355,7 +355,7 @@ public:
|
||||
return Utils::Icons::ERROR.icon();
|
||||
if (k->hasWarning())
|
||||
return Utils::Icons::WARNING.icon();
|
||||
break;
|
||||
return Utils::Icons::EMPTY14.icon();
|
||||
}
|
||||
|
||||
case Qt::TextColorRole: {
|
||||
@@ -561,6 +561,9 @@ public:
|
||||
case ActiveItemRole:
|
||||
return QVariant::fromValue<TreeItem *>(const_cast<BuildOrRunItem *>(this));
|
||||
|
||||
case Qt::DecorationRole:
|
||||
return Utils::Icons::EMPTY14.icon();
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ CustomWidgetWidgetsWizardPage::CustomWidgetWidgetsWizardPage(QWidget *parent) :
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_ui->tabStackWidget->setLayout(m_tabStackLayout);
|
||||
m_ui->addButton->setIcon(Utils::Icons::PLUS.icon());
|
||||
m_ui->addButton->setIcon(Utils::Icons::PLUS_TOOLBAR.icon());
|
||||
connect(m_ui->addButton, &QAbstractButton::clicked, m_ui->classList, &ClassList::startEditingNewClassItem);
|
||||
m_ui->deleteButton->setIcon(Utils::Icons::MINUS.icon());
|
||||
connect(m_ui->deleteButton, &QAbstractButton::clicked, m_ui->classList, &ClassList::removeCurrentClass);
|
||||
|
||||
@@ -58,7 +58,7 @@ QPixmap QmlDesignerIconProvider::requestPixmap(const QString &id, QSize *size, c
|
||||
if (id == "close")
|
||||
result = Utils::Icons::CLOSE_TOOLBAR.pixmap();
|
||||
else if (id == "plus")
|
||||
result = Utils::Icons::PLUS.pixmap();
|
||||
result = Utils::Icons::PLUS_TOOLBAR.pixmap();
|
||||
else if (id == "expression")
|
||||
result = Icon({
|
||||
{ iconPath() + QLatin1String("expression.png"), Theme::IconsBaseColor}}, Icon::Tint).pixmap();
|
||||
|
||||
@@ -124,7 +124,7 @@ QList<QToolButton *> ConnectionViewWidget::createToolBarWidgets()
|
||||
QList<QToolButton *> buttons;
|
||||
|
||||
buttons << new QToolButton();
|
||||
buttons.last()->setIcon(Utils::Icons::PLUS.icon());
|
||||
buttons.last()->setIcon(Utils::Icons::PLUS_TOOLBAR.icon());
|
||||
buttons.last()->setToolTip(tr("Add binding or connection."));
|
||||
connect(buttons.last(), SIGNAL(clicked()), this, SLOT(addButtonClicked()));
|
||||
connect(this, SIGNAL(setEnabledAddButton(bool)), buttons.last(), SLOT(setEnabled(bool)));
|
||||
|
||||
Reference in New Issue
Block a user