From 3c73d74cbb079845a867d0b34928e61bce74da5a Mon Sep 17 00:00:00 2001 From: Mike Gelfand Date: Sat, 17 Jan 2015 13:49:02 +0000 Subject: [PATCH] Fallback to message box warning icon if emblem-important is not provided by the icon theme --- qt/torrent-delegate-min.cc | 2 +- qt/torrent-delegate.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qt/torrent-delegate-min.cc b/qt/torrent-delegate-min.cc index 9ddee6e2f..fd5b6bc7a 100644 --- a/qt/torrent-delegate-min.cc +++ b/qt/torrent-delegate-min.cc @@ -137,7 +137,7 @@ TorrentDelegateMin::drawTorrent (QPainter * painter, progressBarState |= QStyle::State_Small; const QIcon::Mode emblemIm = isItemSelected ? QIcon::Selected : QIcon::Normal; - const QIcon emblemIcon = tor.hasError () ? QIcon::fromTheme ("emblem-important") : QIcon (); + const QIcon emblemIcon = tor.hasError () ? QIcon::fromTheme ("emblem-important", style->standardIcon (QStyle::SP_MessageBoxWarning)) : QIcon (); // layout const QSize m (margin (*style)); diff --git a/qt/torrent-delegate.cc b/qt/torrent-delegate.cc index f63e2aa21..1926f70b4 100644 --- a/qt/torrent-delegate.cc +++ b/qt/torrent-delegate.cc @@ -420,7 +420,7 @@ TorrentDelegate::drawTorrent (QPainter * painter, progressBarState |= QStyle::State_Small; const QIcon::Mode emblemIm = isItemSelected ? QIcon::Selected : QIcon::Normal; - const QIcon emblemIcon = tor.hasError () ? QIcon::fromTheme ("emblem-important") : QIcon (); + const QIcon emblemIcon = tor.hasError () ? QIcon::fromTheme ("emblem-important", style->standardIcon (QStyle::SP_MessageBoxWarning)) : QIcon (); // layout const QSize m (margin (*style)); -- 2.40.0