diff options
Diffstat (limited to 'src/qt/scicon.cpp')
-rw-r--r-- | src/qt/scicon.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/qt/scicon.cpp b/src/qt/scicon.cpp index a0ffcd82a9..c493b5569e 100644 --- a/src/qt/scicon.cpp +++ b/src/qt/scicon.cpp @@ -11,7 +11,9 @@ #include <QPalette> #include <QPixmap> -static void MakeSingleColorImage(QImage& img, const QColor& colorbase) +namespace { + +void MakeSingleColorImage(QImage& img, const QColor& colorbase) { img = img.convertToFormat(QImage::Format_ARGB32); for (int x = img.width(); x--; ) @@ -24,15 +26,22 @@ static void MakeSingleColorImage(QImage& img, const QColor& colorbase) } } +} + QImage SingleColorImage(const QString& filename, const QColor& colorbase) { QImage img(filename); +#if !defined(WIN32) && !defined(MAC_OSX) MakeSingleColorImage(img, colorbase); +#endif return img; } QIcon SingleColorIcon(const QIcon& ico, const QColor& colorbase) { +#if defined(WIN32) || defined(MAC_OSX) + return ico; +#else QIcon new_ico; QSize sz; Q_FOREACH(sz, ico.availableSizes()) @@ -42,6 +51,7 @@ QIcon SingleColorIcon(const QIcon& ico, const QColor& colorbase) new_ico.addPixmap(QPixmap::fromImage(img)); } return new_ico; +#endif } QIcon SingleColorIcon(const QString& filename, const QColor& colorbase) @@ -51,6 +61,9 @@ QIcon SingleColorIcon(const QString& filename, const QColor& colorbase) QColor SingleColor() { +#if defined(WIN32) || defined(MAC_OSX) + return QColor(0,0,0); +#else const QColor colorHighlightBg(QApplication::palette().color(QPalette::Highlight)); const QColor colorHighlightFg(QApplication::palette().color(QPalette::HighlightedText)); const QColor colorText(QApplication::palette().color(QPalette::WindowText)); @@ -61,6 +74,7 @@ QColor SingleColor() else colorbase = colorHighlightFg; return colorbase; +#endif } QIcon SingleColorIcon(const QString& filename) |