aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorJens Bache-Wiig <[email protected]>2009-06-03 20:19:47 +0200
committerJens Bache-Wiig <[email protected]>2009-06-03 20:22:10 +0200
commit3df7a2c301379e98b0e96664a9180a8f8d666f0b (patch)
treeb7226d6c9d1c6c9960054031a2da243c2c9499d7 /src/plugins
parente083ad2920d6e5695f309fe5b4b7c7d1b3060d61 (diff)
Fixes: Fix overlapping alpha values in expander area
Details: There are platform differences when drawing overlapping alpha rects here. The workaround was to simply avoid using alpha values for now.
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/texteditor/basetexteditor.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp
index b6b7408f16c..44ab1dab1fe 100644
--- a/src/plugins/texteditor/basetexteditor.cpp
+++ b/src/plugins/texteditor/basetexteditor.cpp
@@ -2257,13 +2257,17 @@ static void drawRectBox(QPainter *painter, const QRect &rect, bool start, bool e
{
painter->save();
painter->setRenderHint(QPainter::Antialiasing, false);
- QColor c = pal.highlight().color();
- c.setAlpha(40);
+
+ QRgb b = pal.base().color().rgb();
+ QRgb h = pal.highlight().color().rgb();
+ QColor c = QColor((qRed(b)*2+qRed(h))/3,
+ (qGreen(b)*2+qGreen(h))/3,
+ (qBlue(b)*2+qBlue(h))/3);
+
QLinearGradient grad(rect.topLeft(), rect.topRight());
- grad.setColorAt(0, c.darker(130));
+ grad.setColorAt(0, c.lighter(110));
grad.setColorAt(1, c.lighter(160));
- QColor outline = c.darker(110);
- outline.setAlpha(100);
+ QColor outline = c;
QRect r = rect;
painter->fillRect(rect, grad);