IDLE: touchpad horizontal scrolling not working
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
Bug report
Bug description:
I know that there isn't a horizontal scrollbar for a reason but I believe that horizontally scrolling on a touchpad/trackpad should still scroll the IDLE editor horizontally. Right now trying to horizontally scroll a file, scrolls it vertically which I find very counter intuitive. The reason for this behaviour is in Lib/idlelib/tree.py (which is used in Lib/idlelib/editor.py):
def wheel_event(event, widget=None):
...
up = {EventType.MouseWheel: event.delta > 0,
EventType.ButtonPress: event.num == 4}
lines = -5 if up[event.type] else 5
widget = event.widget if widget is None else widget
widget.yview(SCROLL, lines, 'units')
return 'break'
The function doesn't respect the direction of scrolling and instead just scrolls vertically (yview). I know this is a minor bug but it's annoying me so much when IDLE tries to scroll vertically when I am scrolling horizontally
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux, Windows
Linked PRs
- gh-140390
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia in Lib/idlelib/tree.py, in wheel_event(), poi verifica come viene utilizzato da Lib/idlelib/editor.py. Conferma come viene rappresentata la direzione del touchpad nei tipi di evento supportati; il lavoro è completato quando lo scorrimento orizzontale del touchpad sposta orizzontalmente l’editor IDLE invece che verticalmente su Linux e Windows.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- desktop
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 25/100