Skip to content

Commit

Permalink
fix wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
LChen committed Dec 2, 2021
1 parent 63c3bfe commit d68049a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ctrl/main.pyw
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ def BindEvents(canvas):
return EventDo(struct.pack('>BBHH', 2, 1, int(e.x/scale), int(e.y/scale)))
canvas.bind(sequence="<MouseWheel>", func=Wheel)
elif PLAT == b'x11':
def WheelUp(e):
return EventDo(struct.pack('>BBHH', 2, 0, int(e.x/scale), int(e.y/scale)))
def WheelDown(e):
return EventDo(struct.pack('>BBHH', 2, 0, int(e.x/scale), int(e.y/scale)))
def WheelUp(e):
return EventDo(struct.pack('>BBHH', 2, 1, int(e.x/scale), int(e.y/scale)))
canvas.bind(sequence="<Button-4>", func=WheelUp)
canvas.bind(sequence="<Button-5>", func=WheelDown)
Expand Down

0 comments on commit d68049a

Please sign in to comment.