[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-multimedia
Subject: [PATCH] QT 3.3 transparency fix for noatun kjofol loader
From: Stefan Gehn <sgehn () gmx ! net>
Date: 2004-02-23 20:12:02
Message-ID: 200402232112.02954.sgehn () gmx ! net
[Download RAW message or body]
Moin,
as the trolls decided to break application compatiblity between major releases
I had to do something and here it is. This patch should make the loader work
properly on both QT 3.3 and still preserving compatibility to older QT
versions.
I need at least two replies, one for QT 3.3 and one for an older version
before I commit this to both HEAD and KDE_3_2_BRANCH.
Please try this patch, it's really easy to apply, is VERY small and also damn
easy to try out (even just checking the kjofol prefs should be enough, though
the sliders are interesting too).
Bye, Stefan aka mETz
--
ICQ#51123152 | Moege der Pinguin mit euch sein
["qt33-transparency.patch" (text/x-diff)]
? kjofol-fixlets.patch
? qt33-transparency.patch
Index: kjseeker.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/noatun/modules/kjofol-skin/kjseeker.cpp,v
retrieving revision 1.13
diff -u -3 -p -r1.13 kjseeker.cpp
--- kjseeker.cpp 5 Dec 2003 22:10:04 -0000 1.13
+++ kjseeker.cpp 23 Feb 2004 20:03:38 -0000
@@ -38,9 +38,13 @@ KJSeeker::KJSeeker(const QStringList &i,
ys=i[4].toInt()-y;
setRect(x,y,xs,ys);
QImage transmask(xs, ys, 1, 2, QImage::LittleEndian);
-
+#if QT_VERSION < 0x030300
transmask.setColor(0, qRgb(0,0,0));
transmask.setColor(1, qRgb(255,255,255));
+#else
+ transmask.setColor(1, qRgb(0,0,0));
+ transmask.setColor(0, qRgb(255,255,255));
+#endif
// clear the pointers
memset(barmodeImages, 0, 256*sizeof(QImage*));
Index: kjwidget.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/noatun/modules/kjofol-skin/kjwidget.cpp,v
retrieving revision 1.5
diff -u -3 -p -r1.5 kjwidget.cpp
--- kjwidget.cpp 17 Sep 2003 17:35:09 -0000 1.5
+++ kjwidget.cpp 23 Feb 2004 20:03:38 -0000
@@ -21,8 +21,14 @@ KJWidget::KJWidget(KJLoader *p) : mParen
QBitmap KJWidget::getMask(const QImage &_rect, register QRgb transparent)
{
QImage result(_rect.width(), _rect.height(), 1,2, QImage::LittleEndian);
- result.setColor(0, qRgb(0,0,0));
+#if QT_VERSION < 0x030300
+ result.setColor(0, qRgb(0,0,0)); //TODO: maybe use Qt::color0 and Qt::color1
result.setColor(1, qRgb(255,255,255));
+#else
+ result.setColor(1, qRgb(0,0,0));
+ result.setColor(0, qRgb(255,255,255));
+#endif
+
for(int height=0;height<_rect.height(); height++)
{
for(int width=0; width<_rect.width(); width++)
_______________________________________________
kde-multimedia mailing list
kde-multimedia@kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic