[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE_3_1_BRANCH: kdelibs/khtml/misc
From:       Dirk Mueller <mueller () kde ! org>
Date:       2003-02-28 23:17:50
[Download RAW message or body]

CVS commit by mueller: 

hack around Qt bugs to get alphablended background images right


  M +12 -1     loader.cpp   1.138.2.4


--- kdelibs/khtml/misc/loader.cpp  #1.138.2.3:1.138.2.4
@@ -510,4 +510,14 @@ void CachedImage::deref( CachedObjectCli
 #define BGMINHEIGHT     32
 
+class KHTMLPixmap : public QPixmap
+{
+public:
+#ifdef Q_WS_X11
+    bool hasAlphaImage() const { return data->alphapm; }
+#else
+    bool hasAlphaImage() const { return false; }
+#endif
+};
+
 const QPixmap &CachedImage::tiled_pixmap(const QColor& newc)
 {
@@ -538,5 +548,6 @@ const QPixmap &CachedImage::tiled_pixmap
             h = ((BGMINHEIGHT / s.height())+1) * s.height();
     }
-    if ( (w != r.width()) || (h != r.height()) || (isvalid && r.mask()))
+    if ( !static_cast<const KHTMLPixmap*>( &r )->hasAlphaImage() &&
+        ( (w != r.width()) || (h != r.height()) || (isvalid && r.mask())) )
     {
         QPixmap pix = r;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic