Cast various floats to ints so we don't get warnings.

This commit is contained in:
Jack Jansen 2003-02-05 15:40:05 +00:00
parent 9181c94e05
commit d424836f3a
2 changed files with 3 additions and 1 deletions

View File

@ -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):

View File

@ -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()