diff options
Diffstat (limited to 'examples2/desktop.py')
-rwxr-xr-x | examples2/desktop.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples2/desktop.py b/examples2/desktop.py index 049f39d..7f48159 100755 --- a/examples2/desktop.py +++ b/examples2/desktop.py @@ -26,7 +26,7 @@ maxcurves = 8 def poly(): d = TQApplication.desktop() - d.setBackgroundColor(white) + d.setPaletteBackgroundColor(white) xvel = [ 0 ] * 8 yvel = [ 0 ] * 8 head = 0 @@ -65,16 +65,16 @@ def poly(): y = y + yvel[i] if x >= maxx: x = maxx - (x - maxx + 1) - xvel[i] = -velocity(i) + xvel[i] = -velocity(i) if x <= minx: x = minx + (minx - x + 1) - xvel[i] = velocity(i) + xvel[i] = velocity(i) if y >= maxy: y = maxy - (y - maxy + 1) - yvel[i] = -velocity(i) + yvel[i] = -velocity(i) if y <= miny: y = miny + (miny - y + 1) - yvel[i] = velocity(i) + yvel[i] = velocity(i) a[head].setPoint(i, x, y) paint.end() @@ -98,7 +98,7 @@ def rotate(): m = TQWMatrix() m.rotate(i) rpm = pm.xForm(m) - d.setBackgroundPixmap(rpm) + d.setPaletteBackgroundPixmap(rpm) d.update() def generateStone(pm, c1, c2, c3): @@ -142,7 +142,7 @@ class DesktopWidget(TQWidget): if not self.pm: self.pm = TQPixmap(64, 64) generateStone(self.pm, c1, c2, c3) - self.setBackgroundPixmap(self.pm) + self.setPaletteBackgroundPixmap(self.pm) self.update() br = self.fontMetrics().boundingRect(self.text) offscreen = TQPixmap(br.width(), br.height()) @@ -186,7 +186,7 @@ def desktopText(s='Troll Tech'): drawShadeText(p, -r.x()+border, -r.y()+border, s, c2, c3) p.end() - tqApp.desktop().setBackgroundPixmap(pm) + tqApp.desktop().setPaletteBackgroundPixmap(pm) a = TQApplication(sys.argv) if len(sys.argv) > 1: |