Skip to content

Commit ca5f688

Browse files
committed
[QT] don't colorize icons on win and mac
1 parent 7247d10 commit ca5f688

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/qt/scicon.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,17 @@ static void MakeSingleColorImage(QImage& img, const QColor& colorbase)
2727
QImage SingleColorImage(const QString& filename, const QColor& colorbase)
2828
{
2929
QImage img(filename);
30+
#if !defined(WIN32) && !defined(MAC_OSX)
3031
MakeSingleColorImage(img, colorbase);
32+
#endif
3133
return img;
3234
}
3335

3436
QIcon SingleColorIcon(const QIcon& ico, const QColor& colorbase)
3537
{
38+
#if defined(WIN32) || defined(MAC_OSX)
39+
return ico;
40+
#else
3641
QIcon new_ico;
3742
QSize sz;
3843
Q_FOREACH(sz, ico.availableSizes())
@@ -42,6 +47,7 @@ QIcon SingleColorIcon(const QIcon& ico, const QColor& colorbase)
4247
new_ico.addPixmap(QPixmap::fromImage(img));
4348
}
4449
return new_ico;
50+
#endif
4551
}
4652

4753
QIcon SingleColorIcon(const QString& filename, const QColor& colorbase)
@@ -51,6 +57,9 @@ QIcon SingleColorIcon(const QString& filename, const QColor& colorbase)
5157

5258
QColor SingleColor()
5359
{
60+
#if defined(WIN32) || defined(MAC_OSX)
61+
return QColor(0,0,0);
62+
#else
5463
const QColor colorHighlightBg(QApplication::palette().color(QPalette::Highlight));
5564
const QColor colorHighlightFg(QApplication::palette().color(QPalette::HighlightedText));
5665
const QColor colorText(QApplication::palette().color(QPalette::WindowText));
@@ -61,6 +70,7 @@ QColor SingleColor()
6170
else
6271
colorbase = colorHighlightFg;
6372
return colorbase;
73+
#endif
6474
}
6575

6676
QIcon SingleColorIcon(const QString& filename)

0 commit comments

Comments
 (0)