Commit 0090b9d0 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

[printqueue] Remove custom window icon

It appears the intention was to have a different window icon based on the printer state.
I can't see this working in action though which suggests that is is broken and given this is rather gimmicky we can safely remove it.
parent a514c1c2
......@@ -17,7 +17,6 @@ target_link_libraries(kde-print-queue
Qt5::Widgets
KF5::CoreAddons
KF5::I18n
KF5::IconThemes
KF5::KIOCore
KF5::KIOWidgets
KF5::WidgetsAddons
......
......@@ -28,7 +28,6 @@
#include <KCupsPrinter.h>
#include <NoSelectionRectDelegate.h>
#include <QPainter>
#include <QToolBar>
#include <QMenu>
#include <QByteArray>
......@@ -38,7 +37,6 @@
#include <QShortcut>
#include <KMessageBox>
#include <KIconLoader>
#include <KSharedConfig>
#include <KConfigGroup>
#include <KWindowConfig>
......@@ -71,7 +69,6 @@ PrintQueueUi::PrintQueueUi(const KCupsPrinter &printer, QWidget *parent) :
// Needed so we have our dialog size saved
setAttribute(Qt::WA_DeleteOnClose);
setWindowIcon(printer.icon());
if (printer.info().isEmpty()) {
m_title = printer.name();
} else {
......@@ -92,15 +89,6 @@ PrintQueueUi::PrintQueueUi(const KCupsPrinter &printer, QWidget *parent) :
// loads the standard key icon
m_printerIcon = printer.icon().pixmap(PRINTER_ICON_SIZE, PRINTER_ICON_SIZE);
ui->iconL->setPixmap(m_printerIcon);
m_pauseIcon = KIconLoader::global()->loadIcon(QLatin1String("media-playback-pause"),
KIconLoader::NoGroup,
KIconLoader::SizeMedium,
KIconLoader::DefaultState,
QStringList(),
nullptr,
true);
ui->printerStatusMsgL->setText(QString());
// setup the jobs model
......@@ -215,7 +203,6 @@ void PrintQueueUi::setState(int state, const QString &message)
}
m_lastState = state;
QPixmap icon(m_printerIcon);
m_printerPaused = false;
switch (state) {
case KCupsPrinter::Idle:
......@@ -240,24 +227,11 @@ void PrintQueueUi::setState(int state, const QString &message)
ui->statusL->setText(i18n("Printer paused"));
ui->pausePrinterPB->setText(i18n("Resume Printer"));
ui->pausePrinterPB->setIcon(QIcon::fromTheme(QLatin1String("media-playback-start")));
// create a painter to paint the action icon over the key icon
{
QPainter painter(&icon);
// the emblem icon to size 32
int overlaySize = KIconLoader::SizeMedium;
QPoint startPoint;
// bottom right corner
startPoint = QPoint(PRINTER_ICON_SIZE - overlaySize - 2,
PRINTER_ICON_SIZE - overlaySize - 2);
painter.drawPixmap(startPoint, m_pauseIcon);
}
break;
default :
ui->statusL->setText(i18n("Printer state unknown"));
break;
}
// set the printer icon
setWindowIcon(icon);
}
}
......
......@@ -83,9 +83,6 @@ private:
QString m_destName;
QString m_title;
QPixmap m_printerIcon;
QPixmap m_pauseIcon;
QPixmap m_startIcon;
QPixmap m_warningIcon;
char m_lastState = 0;
bool m_isClass;
bool m_preparingMenu = false;
......
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