summaryrefslogtreecommitdiffstats
path: root/tdefx/kstyle.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-16 01:58:28 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-16 01:59:35 -0500
commita1c30c142a7b631d6ff66f12d8b48c9aec07190f (patch)
tree11e0a6f87716b55de92c058b979c3431d7ae7e58 /tdefx/kstyle.cpp
parent55b5f448ed1fa1476eedadea8e2b20319f239801 (diff)
downloadtdelibs-a1c30c142a7b631d6ff66f12d8b48c9aec07190f.tar.gz
tdelibs-a1c30c142a7b631d6ff66f12d8b48c9aec07190f.zip
Fix slider drawing on external paint devices
Diffstat (limited to 'tdefx/kstyle.cpp')
-rw-r--r--tdefx/kstyle.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/tdefx/kstyle.cpp b/tdefx/kstyle.cpp
index d4cb9bda4..02208406b 100644
--- a/tdefx/kstyle.cpp
+++ b/tdefx/kstyle.cpp
@@ -1138,11 +1138,14 @@ void KStyle::drawComplexControl( TQ_ComplexControl control,
last = querySubControlMetrics(control, widget, SC_ScrollBarLast, opt);
subline2 = addline;
- if ( useThreeButtonScrollBar )
- if (horizontal)
+ if ( useThreeButtonScrollBar ) {
+ if (horizontal) {
subline2.moveBy(-addline.width(), 0);
- else
+ }
+ else {
subline2.moveBy(0, -addline.height());
+ }
+ }
// Draw the up/left button set
if ((controls & SC_ScrollBarSubLine) && subline.isValid()) {
@@ -1238,7 +1241,14 @@ void KStyle::drawComplexControl( TQ_ComplexControl control,
}
p2.end();
- bitBlt((TQWidget*)widget, r.x(), r.y(), &pix);
+
+ TQPaintDevice* ppd = p->device();
+ if (ppd->isExtDev()) {
+ p->drawPixmap(0, 0, pix);
+ }
+ else {
+ bitBlt((TQWidget*)widget, r.x(), r.y(), &pix);
+ }
break;
}
@@ -2105,7 +2115,6 @@ TQImage TransparencyHandler::handleRealAlpha(TQImage img) {
for (int y = 0; y < h; ++y) {
TQRgb *ls = (TQRgb *)clearImage.scanLine( y );
for (int x = 0; x < w; ++x) {
- TQRgb l = ls[x];
ls[x] = tqRgba( 0, 0, 0, 0 );
}
}