diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-02-05 15:40:05 +0000 |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-02-05 15:40:05 +0000 |
commit | 27e5bed766655c99b8f1bbf3c6c1da6a1b31f62f (patch) | |
tree | 1dbc91680e749062058ca6b645625c6e4edea601 /Mac | |
parent | 2c8550ca904113687afa92b927e23635fc6473c5 (diff) | |
download | cpython-27e5bed766655c99b8f1bbf3c6c1da6a1b31f62f.tar.gz |
Cast various floats to ints so we don't get warnings.
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/Tools/IDE/Wbase.py | 2 | ||||
-rw-r--r-- | Mac/Tools/IDE/Wtext.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Mac/Tools/IDE/Wbase.py b/Mac/Tools/IDE/Wbase.py index f988ce7a7a..2e85ce6745 100644 --- a/Mac/Tools/IDE/Wbase.py +++ b/Mac/Tools/IDE/Wbase.py @@ -401,7 +401,7 @@ class Frame(Widget): Qd.SetPenState(penstate) def _darkencolor((r, g, b)): - return 0.75 * r, 0.75 * g, 0.75 * b + return int(0.75 * r), int(0.75 * g), int(0.75 * b) class BevelBox(Widget): diff --git a/Mac/Tools/IDE/Wtext.py b/Mac/Tools/IDE/Wtext.py index d611c73464..3894e164ed 100644 --- a/Mac/Tools/IDE/Wtext.py +++ b/Mac/Tools/IDE/Wtext.py @@ -529,6 +529,7 @@ class EditText(Wbase.SelectableWidget, _ScrollWidget): delta = vr[1] - dr[1] - value delta = min(maxdelta, delta) delta = max(mindelta, delta) + delta = int(delta) self.ted.WEScroll(0, delta) self.updatescrollbars() @@ -556,6 +557,7 @@ class EditText(Wbase.SelectableWidget, _ScrollWidget): # delta = viewoffset delta = min(maxdelta, delta) delta = max(mindelta, delta) + delta = int(delta) self.ted.WEScroll(delta, 0) self.updatescrollbars() |