Enable using clear icon from theme

This commit is contained in:
Martchus 2019-05-28 23:53:49 +02:00
parent 303d9ae779
commit e32f3c9dad
1 changed files with 4 additions and 4 deletions

View File

@ -76,10 +76,10 @@ void ButtonOverlay::setClearButtonEnabled(bool enabled)
// enable clear button // enable clear button
m_clearButton = new IconButton; m_clearButton = new IconButton;
m_clearButton->setHidden(isCleared()); m_clearButton->setHidden(isCleared());
m_clearButton->setPixmap( m_clearButton->setPixmap(QIcon::fromTheme(QStringLiteral("edit-clear"),
/*QIcon::fromTheme(QStringLiteral("edit-clear"), */ QIcon(QStringLiteral(":/qtutilities/icons/hicolor/48x48/actions/" QIcon(QStringLiteral(":/qtutilities/icons/hicolor/48x48/actions/"
"edit-clear.png") /*)*/) "edit-clear.png")))
.pixmap(16)); .pixmap(16));
m_clearButton->setGeometry(0, 0, 16, 16); m_clearButton->setGeometry(0, 0, 16, 16);
m_clearButton->setToolTip(QObject::tr("Clear")); m_clearButton->setToolTip(QObject::tr("Clear"));
QObject::connect(m_clearButton, &IconButton::clicked, std::bind(&ButtonOverlay::handleClearButtonClicked, this)); QObject::connect(m_clearButton, &IconButton::clicked, std::bind(&ButtonOverlay::handleClearButtonClicked, this));