mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fixed viewrect/destrect calculation
This commit is contained in:
parent
e57c96ee4c
commit
ee8662febd
1 changed files with 8 additions and 2 deletions
|
@ -21,8 +21,14 @@ class TEWindow(ScrolledWindow):
|
||||||
r = windowbounds(400, 400)
|
r = windowbounds(400, 400)
|
||||||
w = Win.NewWindow(r, name, 1, 0, -1, 1, 0x55555555)
|
w = Win.NewWindow(r, name, 1, 0, -1, 1, 0x55555555)
|
||||||
self.wid = w
|
self.wid = w
|
||||||
vr = 0, 0, r[2]-r[0]-15, r[3]-r[1]-15
|
x0, y0, x1, y1 = self.wid.GetWindowPort().portRect
|
||||||
dr = (0, 0, vr[2], 0)
|
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.SetPort(w)
|
||||||
Qd.TextFont(4)
|
Qd.TextFont(4)
|
||||||
Qd.TextSize(9)
|
Qd.TextSize(9)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue