use koIcon/KIcon instead of QIcon::fromTheme(...)

parent f6731434
......@@ -23,6 +23,7 @@
#include <KoCanvasResourceManager.h>
#include <KoCanvasBase.h>
#include <KoColorSpaceRegistry.h>
#include <KoIcon.h>
#include <QFileSystemModel>
#include <QImageReader>
......@@ -32,7 +33,6 @@
#include <QDir>
#include <QLineEdit>
#include <QLabel>
#include <QIcon>
#include <QAbstractListModel>
#include <QButtonGroup>
......@@ -172,16 +172,16 @@ ImageDockerDock::ImageDockerDock():
m_proxyModel->setSourceModel(m_model);
m_proxyModel->setDynamicSortFilter(true);
m_ui->bnBack->setIcon(QIcon::fromTheme("go-previous"));
m_ui->bnUp->setIcon(QIcon::fromTheme("go-up"));
m_ui->bnHome->setIcon(QIcon::fromTheme("go-home"));
m_ui->bnImgPrev->setIcon(QIcon::fromTheme("go-previous"));
m_ui->bnImgNext->setIcon(QIcon::fromTheme("go-next"));
m_ui->bnImgClose->setIcon(QIcon::fromTheme("window-close"));
m_ui->bnBack->setIcon(koIcon("go-previous"));
m_ui->bnUp->setIcon(koIcon("go-up"));
m_ui->bnHome->setIcon(koIcon("go-home"));
m_ui->bnImgPrev->setIcon(koIcon("go-previous"));
m_ui->bnImgNext->setIcon(koIcon("go-next"));
m_ui->bnImgClose->setIcon(koIcon("window-close"));
m_ui->thumbView->setScene(m_thumbModel);
m_ui->treeView->setModel(m_proxyModel);
m_ui->cmbImg->setModel(m_imgListModel);
m_ui->bnPopup->setIcon(QIcon::fromTheme("zoom-original"));
m_ui->bnPopup->setIcon(koIcon("zoom-original"));
m_ui->bnPopup->setPopupWidget(m_popupUi);
m_popupUi->zoomSlider->setRange(5, 500);
......
......@@ -17,6 +17,8 @@
#include "kis_image_strip_scene.h"
#include <KoIcon.h>
#include <QDir>
#include <QPainter>
#include <QHash>
......@@ -24,7 +26,6 @@
#include <QGraphicsLinearLayout>
#include <QGraphicsWidget>
#include <QMutexLocker>
#include <QIcon>
/////////////////////////////////////////////////////////////////////////////////////////////
// ------------- KisImageLoader ---------------------------------------------------------- //
......@@ -77,14 +78,14 @@ void KisImageItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* opti
painter->drawImage(offset, image);
}
else {
QIcon icon = QIcon::fromTheme("image-missing");
QIcon icon = koIcon("image-missing");
QRect rect = boundingRect().toRect();
QPixmap img = icon.pixmap(rect.size());
painter->drawPixmap(rect, img, img.rect());
}
}
else {
QIcon icon = QIcon::fromTheme("image-loading");
QIcon icon = koIcon("image-loading");
QRect rect = boundingRect().toRect();
QPixmap img = icon.pixmap(rect.size());
painter->drawPixmap(rect, img, img.rect());
......
......@@ -18,6 +18,9 @@
*/
#include <KoCompositeOp.h>
#include <KoIcon.h>
#include "kis_composite_ops_model.h"
#include "kis_debug.h"
#include "kis_config.h"
......@@ -80,7 +83,7 @@ QVariant KisCompositeOpListModel::data(const QModelIndex& idx, int role) const
BaseClass::Index index = BaseClass::getIndex(idx.row());
if(!BaseClass::isHeader(index) && BaseClass::m_categories[index.first].entries[index.second].disabled)
return QIcon::fromTheme("dialog-warning");
return koIcon("dialog-warning");
}
return BaseClass::data(idx, role);
......
......@@ -17,6 +17,9 @@
*/
#include "kis_widget_chooser.h"
#include <KoIcon.h>
#include <QGridLayout>
#include <QHBoxLayout>
#include <QToolButton>
......@@ -33,7 +36,7 @@ KisWidgetChooser::KisWidgetChooser(QWidget* parent):
{
// QFrame::setFrameStyle(QFrame::StyledPanel|QFrame::Raised);
m_acceptIcon = QIcon::fromTheme("list-add");
m_acceptIcon = koIcon("list-add");
m_buttons = new QButtonGroup();
m_popup = new QFrame(0, Qt::Popup);
m_arrowButton = new QToolButton();
......
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