Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
077059e0
Unverified
Kaydet (Commit)
077059e0
authored
Agu 10, 2018
tarafından
Tal Einat
Kaydeden (comit)
GitHub
Agu 10, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-34047: IDLE: fix mousewheel scrolling direction on macOS (GH-8678)
üst
b92c526e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
editor.py
Lib/idlelib/editor.py
+17
-6
2018-08-05-15-49-55.bpo-34047.LGKsIm.rst
...NEWS.d/next/IDLE/2018-08-05-15-49-55.bpo-34047.LGKsIm.rst
+1
-0
No files found.
Lib/idlelib/editor.py
Dosyayı görüntüle @
077059e0
...
...
@@ -457,12 +457,19 @@ class EditorWindow(object):
return
'break'
def
mousescroll
(
self
,
event
):
"Handle scroll wheel."
up
=
{
EventType
.
MouseWheel
:
event
.
delta
>=
0
==
darwin
,
"""Handle scrollwheel event.
For wheel up, event.delta = 120*n on Windows, -1*n on darwin,
where n can be > 1 if one scrolls fast. Flicking the wheel
generates up to maybe 20 events with n up to 10 or more 1.
Macs use wheel down (delta = 1*n) to scroll up, so positive
delta means to scroll up on both systems.
X-11 sends Control-Button-4 event instead.
"""
up
=
{
EventType
.
MouseWheel
:
event
.
delta
>
0
,
EventType
.
Button
:
event
.
num
==
4
}
lines
=
5
if
up
[
event
.
type
]:
lines
=
-
lines
lines
=
-
5
if
up
[
event
.
type
]
else
5
self
.
text
.
yview_scroll
(
lines
,
'units'
)
return
'break'
...
...
@@ -1701,7 +1708,11 @@ def _editor_window(parent): # htest #
filename
=
None
macosx
.
setupApp
(
root
,
None
)
edit
=
EditorWindow
(
root
=
root
,
filename
=
filename
)
edit
.
text
.
bind
(
"<<close-all-windows>>"
,
edit
.
close_event
)
text
=
edit
.
text
text
[
'height'
]
=
10
for
i
in
range
(
20
):
text
.
insert
(
'insert'
,
' '
*
i
+
str
(
i
)
+
'
\n
'
)
# text.bind("<<close-all-windows>>", edit.close_event)
# Does not stop error, neither does following
# edit.text.bind("<<close-window>>", edit.close_event)
...
...
Misc/NEWS.d/next/IDLE/2018-08-05-15-49-55.bpo-34047.LGKsIm.rst
0 → 100644
Dosyayı görüntüle @
077059e0
Fixed mousewheel scrolling direction on macOS.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment