summaryrefslogtreecommitdiffstats
path: root/qt-ui/starwidget.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2014-11-04 09:35:07 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-04 07:03:54 -0800
commitb16cc784824aca3bc8f4ca3af4d773ad7bee6098 (patch)
tree78f4524bc5c1ab9c8587edd1d299dadec15d6e53 /qt-ui/starwidget.cpp
parent0dd87989a878945331ea3266ff0f490f058bfea3 (diff)
downloadsubsurface-b16cc784824aca3bc8f4ca3af4d773ad7bee6098.tar.gz
Replace alpha value of gray star with lighter gray
It seems, on Linux qrgba does not work properly making stars with alpha red when selected. So the patch returns to just rgb without transparency but decreases the contrast to white by a factor of 5. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/starwidget.cpp')
-rw-r--r--qt-ui/starwidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/starwidget.cpp b/qt-ui/starwidget.cpp
index 51281ab28..005396761 100644
--- a/qt-ui/starwidget.cpp
+++ b/qt-ui/starwidget.cpp
@@ -108,8 +108,8 @@ QImage grayImage(const QImage& coloredImg)
continue;
QColor c(rgb);
- int gray = (c.red() + c.green() + c.blue()) / 3;
- img.setPixel(i, j, qRgba(gray, gray, gray, 60));
+ int gray = 204 + (c.red() + c.green() + c.blue()) / 15;
+ img.setPixel(i, j, qRgb(gray, gray, gray));
}
}