From b5c7e843fe644f16fefee6e9e2d18d6eb1a0037d Mon Sep 17 00:00:00 2001 From: Rik Hemsley Date: Sun, 16 Sep 2001 09:26:29 +0000 Subject: [PATCH] Don't know if these masking fixes are necessary anymore now that QPixmap is 'fixed' - but they don't do any harm, so they go in anyway. svn path=/trunk/kdebase/kwin/; revision=114434 --- clients/riscos/Button.cpp | 5 +++++ clients/riscos/Static.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/clients/riscos/Button.cpp b/clients/riscos/Button.cpp index fe0a5094ad..852215ba0d 100644 --- a/clients/riscos/Button.cpp +++ b/clients/riscos/Button.cpp @@ -127,6 +127,11 @@ Button::setPixmap(const QPixmap & p) aPixmap_.convertFromImage(aTx); iPixmap_.convertFromImage(iTx); + if (0 != p.mask()) + { + aPixmap_.setMask(*p.mask()); + iPixmap_.setMask(*p.mask()); + } } repaint(); diff --git a/clients/riscos/Static.cpp b/clients/riscos/Static.cpp index 56d16a7721..4b2d89b36f 100644 --- a/clients/riscos/Static.cpp +++ b/clients/riscos/Static.cpp @@ -198,8 +198,9 @@ Static::_createTexture(QPixmap & px, int t, bool active) QColor c(options->color(Options::ColorType(t), active)); - QRgb light(c.light(110).rgb()); - QRgb dark (c.dark(110).rgb()); + QRgb mid (c.rgb()); + QRgb light (c.light(110).rgb()); + QRgb dark (c.dark(110).rgb()); QRgb * data(reinterpret_cast(texture.bits())); @@ -208,6 +209,8 @@ Static::_createTexture(QPixmap & px, int t, bool active) data[x] = light; else if (data[x] == b) data[x] = dark; + else + data[x] = mid; px.convertFromImage(texture); }