mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-18 14:00:09 +00:00
Disabling tray icon recolor on Linux
This commit is contained in:
@@ -85,16 +85,6 @@ QImage _trayIconImageGen() {
|
||||
if (_trayIconImageBack.isNull() || _trayIconImageBack.width() != _trayIconSize) {
|
||||
_trayIconImageBack = Core::App().logo().scaled(_trayIconSize, _trayIconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||
_trayIconImageBack = _trayIconImageBack.convertToFormat(QImage::Format_ARGB32);
|
||||
int w = _trayIconImageBack.width(), h = _trayIconImageBack.height(), perline = _trayIconImageBack.bytesPerLine();
|
||||
uchar *bytes = _trayIconImageBack.bits();
|
||||
for (int32 y = 0; y < h; ++y) {
|
||||
for (int32 x = 0; x < w; ++x) {
|
||||
int32 srcoff = y * perline + x * 4;
|
||||
bytes[srcoff + QT_RED ] = qMax(bytes[srcoff + QT_RED ], uchar(224));
|
||||
bytes[srcoff + QT_GREEN] = qMax(bytes[srcoff + QT_GREEN], uchar(165));
|
||||
bytes[srcoff + QT_BLUE ] = qMax(bytes[srcoff + QT_BLUE ], uchar(44));
|
||||
}
|
||||
}
|
||||
}
|
||||
_trayIconImage = _trayIconImageBack;
|
||||
_trayIconMuted = muted;
|
||||
|
Reference in New Issue
Block a user