Skip to content

Commit 207b6f4

Browse files
committed
s/scroll_amount/amount/ just for fun
1 parent 5773b12 commit 207b6f4

File tree

1 file changed

+6
-6
lines changed
  • src/ScrollableContainers

1 file changed

+6
-6
lines changed

src/ScrollableContainers/_tk.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,20 +218,20 @@ def _scroll_viewport(self, event: tk.Event):
218218
"""
219219
match _system:
220220
case "Linux" if event.num == 4:
221-
scroll_amount = -1
221+
amount = -1
222222
case "Linux" if event.num == 5:
223-
scroll_amount = 1
223+
amount = 1
224224
case "Darwin":
225-
scroll_amount = -event.delta
225+
amount = -event.delta
226226
case "Windows":
227-
scroll_amount = -event.delta // 120
227+
amount = -event.delta // 120
228228
case _:
229229
message = f"event {event.num} on OS {_system!r} is not supported"
230230
raise ValueError(message)
231231

232232
# Select the method to call based on whether Shift was held down. This
233233
# is indicated by the LSB of the state.
234234
if event.state & 1:
235-
self._xview(tk.SCROLL, scroll_amount, tk.UNITS)
235+
self._xview(tk.SCROLL, amount, tk.UNITS)
236236
else:
237-
self._yview(tk.SCROLL, scroll_amount, tk.UNITS)
237+
self._yview(tk.SCROLL, amount, tk.UNITS)

0 commit comments

Comments
 (0)