Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b9311676
Commit
b9311676
authored
May 25, 2003
by
Just van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed some DeprecationWarnings
parent
8fa4bc52
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
Mac/Tools/IDE/Wbase.py
Mac/Tools/IDE/Wbase.py
+9
-5
No files found.
Mac/Tools/IDE/Wbase.py
View file @
b9311676
...
...
@@ -8,6 +8,10 @@ class WidgetsError(Exception): pass
DEBUG
=
0
def
_intRect
((
l
,
t
,
r
,
b
)):
return
(
int
(
l
),
int
(
t
),
int
(
r
),
int
(
b
))
class
Widget
:
"""Base class for all widgets."""
...
...
@@ -115,7 +119,7 @@ class Widget:
# the bounds relative to our parent widget.
width
=
pr
-
pl
height
=
pb
-
pt
self
.
_bounds
=
Qd
.
OffsetRect
(
self
.
_possize
(
width
,
height
),
pl
,
pt
)
self
.
_bounds
=
Qd
.
OffsetRect
(
_intRect
(
self
.
_possize
(
width
,
height
)
),
pl
,
pt
)
else
:
# _possize must be a 4-tuple. This is where the algorithm by Peter Kriens and
# Petr van Blokland kicks in. (*** Parts of this algorithm are applied for
...
...
@@ -571,7 +575,7 @@ class HorizontalPanes(Widget):
# track mouse --- XXX move to separate method?
Qd
.
PenMode
(
QuickDraw
.
srcXor
)
Qd
.
PenPat
(
Qd
.
GetQDGlobalsGray
())
Qd
.
PaintRect
(
rect
)
Qd
.
PaintRect
(
_intRect
(
rect
)
)
lastpos
=
None
while
Evt
.
Button
():
pos
=
orgpos
-
orgmouse
+
Evt
.
GetMouse
()[
self
.
_direction
]
...
...
@@ -580,17 +584,17 @@ class HorizontalPanes(Widget):
if
pos
==
lastpos
:
continue
Qd
.
PenPat
(
Qd
.
GetQDGlobalsGray
())
Qd
.
PaintRect
(
rect
)
Qd
.
PaintRect
(
_intRect
(
rect
)
)
if
self
.
_direction
:
rect
=
l
,
pos
-
1
,
r
,
pos
else
:
rect
=
pos
-
1
,
t
,
pos
,
b
Qd
.
PenPat
(
Qd
.
GetQDGlobalsGray
())
Qd
.
PaintRect
(
rect
)
Qd
.
PaintRect
(
_intRect
(
rect
)
)
lastpos
=
pos
self
.
_parentwindow
.
wid
.
GetWindowPort
().
QDFlushPortBuffer
(
None
)
Evt
.
WaitNextEvent
(
0
,
3
)
Qd
.
PaintRect
(
rect
)
Qd
.
PaintRect
(
_intRect
(
rect
)
)
Qd
.
PenNormal
()
SetCursor
(
"watch"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment