summaryrefslogtreecommitdiffstats
path: root/Mac/Demo/textedit
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1996-08-19 10:58:37 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1996-08-19 10:58:37 (GMT)
commitee8662febda4ac1ee9d3604e452220554c08ab23 (patch)
tree7c06ad76b2139a68995820427ca37f55542c4745 /Mac/Demo/textedit
parente57c96ee4cef00515e3bf6529d6888c4b5f8483b (diff)
downloadcpython-ee8662febda4ac1ee9d3604e452220554c08ab23.zip
cpython-ee8662febda4ac1ee9d3604e452220554c08ab23.tar.gz
cpython-ee8662febda4ac1ee9d3604e452220554c08ab23.tar.bz2
Fixed viewrect/destrect calculation
Diffstat (limited to 'Mac/Demo/textedit')
-rw-r--r--Mac/Demo/textedit/ped.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Mac/Demo/textedit/ped.py b/Mac/Demo/textedit/ped.py
index 92c852e..3999dae 100644
--- a/Mac/Demo/textedit/ped.py
+++ b/Mac/Demo/textedit/ped.py
@@ -21,8 +21,14 @@ class TEWindow(ScrolledWindow):
r = windowbounds(400, 400)
w = Win.NewWindow(r, name, 1, 0, -1, 1, 0x55555555)
self.wid = w
- vr = 0, 0, r[2]-r[0]-15, r[3]-r[1]-15
- dr = (0, 0, vr[2], 0)
+ x0, y0, x1, y1 = self.wid.GetWindowPort().portRect
+ x0 = x0 + 4
+ y0 = y0 + 4
+ x1 = x1 - 20
+ y1 = y1 - 20
+ vr = dr = x0, y0, x1, y1
+ ##vr = 4, 0, r[2]-r[0]-15, r[3]-r[1]-15
+ ##dr = (0, 0, vr[2], 0)
Qd.SetPort(w)
Qd.TextFont(4)
Qd.TextSize(9)