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
a96c96f5
Kaydet (Commit)
a96c96f5
authored
Eyl 21, 2017
tarafından
Serhiy Storchaka
Kaydeden (comit)
GitHub
Eyl 21, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-31500: IDLE: Scale default fonts on HiDPI displays. (#3639)
üst
3d1e2ab5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
0 deletions
+20
-0
filelist.py
Lib/idlelib/filelist.py
+2
-0
pyshell.py
Lib/idlelib/pyshell.py
+4
-0
run.py
Lib/idlelib/run.py
+13
-0
2017-09-18-10-43-03.bpo-31500.Y_YDxA.rst
...NEWS.d/next/IDLE/2017-09-18-10-43-03.bpo-31500.Y_YDxA.rst
+1
-0
No files found.
Lib/idlelib/filelist.py
Dosyayı görüntüle @
a96c96f5
...
@@ -113,8 +113,10 @@ class FileList:
...
@@ -113,8 +113,10 @@ class FileList:
def
_test
():
def
_test
():
from
idlelib.editor
import
fixwordbreaks
from
idlelib.editor
import
fixwordbreaks
from
idlelib.run
import
fix_scaling
import
sys
import
sys
root
=
Tk
()
root
=
Tk
()
fix_scaling
(
root
)
fixwordbreaks
(
root
)
fixwordbreaks
(
root
)
root
.
withdraw
()
root
.
withdraw
()
flist
=
FileList
(
root
)
flist
=
FileList
(
root
)
...
...
Lib/idlelib/pyshell.py
Dosyayı görüntüle @
a96c96f5
...
@@ -12,6 +12,8 @@ import tkinter.messagebox as tkMessageBox
...
@@ -12,6 +12,8 @@ import tkinter.messagebox as tkMessageBox
if
TkVersion
<
8.5
:
if
TkVersion
<
8.5
:
root
=
Tk
()
# otherwise create root in main
root
=
Tk
()
# otherwise create root in main
root
.
withdraw
()
root
.
withdraw
()
from
idlelib.run
import
fix_scaling
fix_scaling
(
root
)
tkMessageBox
.
showerror
(
"Idle Cannot Start"
,
tkMessageBox
.
showerror
(
"Idle Cannot Start"
,
"Idle requires tcl/tk 8.5+, not
%
s."
%
TkVersion
,
"Idle requires tcl/tk 8.5+, not
%
s."
%
TkVersion
,
parent
=
root
)
parent
=
root
)
...
@@ -1457,6 +1459,8 @@ def main():
...
@@ -1457,6 +1459,8 @@ def main():
NoDefaultRoot
()
NoDefaultRoot
()
root
=
Tk
(
className
=
"Idle"
)
root
=
Tk
(
className
=
"Idle"
)
root
.
withdraw
()
root
.
withdraw
()
from
idlelib.run
import
fix_scaling
fix_scaling
(
root
)
# set application icon
# set application icon
icondir
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'Icons'
)
icondir
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'Icons'
)
...
...
Lib/idlelib/run.py
Dosyayı görüntüle @
a96c96f5
...
@@ -184,6 +184,7 @@ def show_socket_error(err, address):
...
@@ -184,6 +184,7 @@ def show_socket_error(err, address):
import
tkinter
import
tkinter
from
tkinter.messagebox
import
showerror
from
tkinter.messagebox
import
showerror
root
=
tkinter
.
Tk
()
root
=
tkinter
.
Tk
()
fix_scaling
(
root
)
root
.
withdraw
()
root
.
withdraw
()
msg
=
f
"IDLE's subprocess can't connect to {address[0]}:{address[1]}.
\n
"
\
msg
=
f
"IDLE's subprocess can't connect to {address[0]}:{address[1]}.
\n
"
\
f
"Fatal OSError #{err.errno}: {err.strerror}.
\n
"
\
f
"Fatal OSError #{err.errno}: {err.strerror}.
\n
"
\
...
@@ -277,6 +278,18 @@ def exit():
...
@@ -277,6 +278,18 @@ def exit():
sys
.
exit
(
0
)
sys
.
exit
(
0
)
def
fix_scaling
(
root
):
"""Scale fonts on HiDPI displays."""
import
tkinter.font
scaling
=
float
(
root
.
tk
.
call
(
'tk'
,
'scaling'
))
if
scaling
>
1.4
:
for
name
in
tkinter
.
font
.
names
(
root
):
font
=
tkinter
.
font
.
Font
(
root
=
root
,
name
=
name
,
exists
=
True
)
size
=
int
(
font
[
'size'
])
if
size
<
0
:
font
[
'size'
]
=
round
(
-
0.75
*
size
)
class
MyRPCServer
(
rpc
.
RPCServer
):
class
MyRPCServer
(
rpc
.
RPCServer
):
def
handle_error
(
self
,
request
,
client_address
):
def
handle_error
(
self
,
request
,
client_address
):
...
...
Misc/NEWS.d/next/IDLE/2017-09-18-10-43-03.bpo-31500.Y_YDxA.rst
0 → 100644
Dosyayı görüntüle @
a96c96f5
Default fonts now are scaled on HiDPI displays.
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