Changeset View
Changeset View
Standalone View
Standalone View
src/qt/networkstyle.cpp
Show All 36 Lines | if (iconColorHueShift != 0 && iconColorSaturationReduction != 0) { | ||||
int h, s, l, a; | int h, s, l, a; | ||||
// traverse though lines | // traverse though lines | ||||
for (int y = 0; y < img.height(); y++) { | for (int y = 0; y < img.height(); y++) { | ||||
QRgb *scL = reinterpret_cast<QRgb *>(img.scanLine(y)); | QRgb *scL = reinterpret_cast<QRgb *>(img.scanLine(y)); | ||||
// loop through pixels | // loop through pixels | ||||
for (int x = 0; x < img.width(); x++) { | for (int x = 0; x < img.width(); x++) { | ||||
// preserve alpha because QColor::getHsl doesen't return the | // preserve alpha because QColor::getHsl doesn't return the | ||||
// alpha value | // alpha value | ||||
a = qAlpha(scL[x]); | a = qAlpha(scL[x]); | ||||
QColor col(scL[x]); | QColor col(scL[x]); | ||||
// get hue value | // get hue value | ||||
col.getHsl(&h, &s, &l); | col.getHsl(&h, &s, &l); | ||||
// rotate color on RGB color circle | // rotate color on RGB color circle | ||||
Show All 33 Lines |