IDLE: touchpad horizontal scrolling not working
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 36k
- PR マージ指標
- PR 指標を取得中
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Lib/idlelib/tree.py の wheel_event() から始め、次に Lib/idlelib/editor.py でどのように使用されているかを確認します。サポートされているイベント型でタッチパッドの方向がどのように表現されるかを確認します。完了条件は、Linux と Windows でタッチパッドの水平スクロールによって IDLE エディターが垂直ではなく水平方向に移動することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- desktop
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 25/100