Utils: Introduce Utils::Icons::PINNED_SMALL

Replaces two duplicated pin.xpm in the pinnable debugger tooltip and the
qmleditorwidgets with the new icon.

Change-Id: I57b7adc5c0b92ffdf01da12dd832482d739cb86e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Alessandro Portale
2023-03-29 15:58:56 +02:00
parent 73c645820f
commit cb3fd6eb0d
7 changed files with 9 additions and 51 deletions

View File

@@ -519,7 +519,7 @@ DebuggerToolTipWidget::DebuggerToolTipWidget()
setAttribute(Qt::WA_DeleteOnClose);
isPinned = false;
const QIcon pinIcon(":/debugger/images/pin.xpm");
const QIcon pinIcon = Utils::Icons::PINNED_SMALL.icon();
pinButton = new QToolButton;
pinButton->setIcon(pinIcon);
@@ -534,9 +534,7 @@ DebuggerToolTipWidget::DebuggerToolTipWidget()
auto toolBar = new QToolBar(this);
toolBar->setProperty("_q_custom_style_disabled", QVariant(true));
const QList<QSize> pinIconSizes = pinIcon.availableSizes();
if (!pinIconSizes.isEmpty())
toolBar->setIconSize(pinIconSizes.front());
toolBar->setIconSize({12, 12});
toolBar->addWidget(pinButton);
toolBar->addWidget(copyButton);
toolBar->addWidget(titleLabel);