[Python-checkins] bpo-38439: Add 256px IDLE icon (GH-17473)
Miss Islington (bot)
webhook-mailer at python.org
Wed Apr 22 03:40:06 EDT 2020
https://github.com/python/cpython/commit/3a5545025685040842420c85a4a9aab5f044aeb8
commit: 3a5545025685040842420c85a4a9aab5f044aeb8
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020年04月22日T00:39:59-07:00
summary:
bpo-38439: Add 256px IDLE icon (GH-17473)
Icon author: Andrew Clover, bpo-1490384
(cherry picked from commit 3a69f3caeeaea57048ed3bc3051e16854b9a4cd6)
Co-authored-by: Miro Hrončok <miro at hroncok.cz>
files:
A Lib/idlelib/Icons/README.txt
A Lib/idlelib/Icons/idle_256.png
A Misc/NEWS.d/next/IDLE/2019-12-05-14-20-53.bpo-38439.j_L2PI.rst
D Lib/idlelib/Icons/idle.icns
M Lib/idlelib/pyshell.py
M PCbuild/lib.pyproj
diff --git a/Lib/idlelib/Icons/README.txt b/Lib/idlelib/Icons/README.txt
new file mode 100644
index 0000000000000..8b471629ecb3e
--- /dev/null
+++ b/Lib/idlelib/Icons/README.txt
@@ -0,0 +1,9 @@
+The IDLE icons are from https://bugs.python.org/issue1490384
+
+Created by Andrew Clover.
+
+The original sources are available from Andrew's website:
+https://www.doxdesk.com/software/py/pyicons.html
+
+Various different formats and sizes are available at this GitHub Pull Request:
+https://github.com/python/cpython/pull/17473
diff --git a/Lib/idlelib/Icons/idle.icns b/Lib/idlelib/Icons/idle.icns
deleted file mode 100644
index f65e3130f0aff..0000000000000
Binary files a/Lib/idlelib/Icons/idle.icns and /dev/null differ
diff --git a/Lib/idlelib/Icons/idle_256.png b/Lib/idlelib/Icons/idle_256.png
new file mode 100644
index 0000000000000..99ffa6fad4a92
Binary files /dev/null and b/Lib/idlelib/Icons/idle_256.png differ
diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py
index 43fb597c2ba6e..66ae0f7435dab 100755
--- a/Lib/idlelib/pyshell.py
+++ b/Lib/idlelib/pyshell.py
@@ -1485,9 +1485,14 @@ def main():
iconfile = os.path.join(icondir, 'idle.ico')
root.wm_iconbitmap(default=iconfile)
elif not macosx.isAquaTk():
- ext = '.png' if TkVersion >= 8.6 else '.gif'
+ if TkVersion >= 8.6:
+ ext = '.png'
+ sizes = (16, 32, 48, 256)
+ else:
+ ext = '.gif'
+ sizes = (16, 32, 48)
iconfiles = [os.path.join(icondir, 'idle_%d%s' % (size, ext))
- for size in (16, 32, 48)]
+ for size in sizes]
icons = [PhotoImage(master=root, file=iconfile)
for iconfile in iconfiles]
root.wm_iconphoto(True, *icons)
diff --git a/Misc/NEWS.d/next/IDLE/2019-12-05-14-20-53.bpo-38439.j_L2PI.rst b/Misc/NEWS.d/next/IDLE/2019-12-05-14-20-53.bpo-38439.j_L2PI.rst
new file mode 100644
index 0000000000000..de048d005cee7
--- /dev/null
+++ b/Misc/NEWS.d/next/IDLE/2019-12-05-14-20-53.bpo-38439.j_L2PI.rst
@@ -0,0 +1,2 @@
+Add a 256×256 pixel IDLE icon to support more modern environments. Created by Andrew Clover.
+Delete the unused macOS idle.icns icon file.
diff --git a/PCbuild/lib.pyproj b/PCbuild/lib.pyproj
index 7ed71bd819cb5..6e9d54511fef1 100644
--- a/PCbuild/lib.pyproj
+++ b/PCbuild/lib.pyproj
@@ -1589,6 +1589,7 @@
<Content Include="idlelib\Icons\idle_32.png" />
<Content Include="idlelib\Icons\idle_48.gif" />
<Content Include="idlelib\Icons\idle_48.png" />
+ <Content Include="idlelib\Icons\idle_256.png" />
<Content Include="idlelib\Icons\minusnode.gif" />
<Content Include="idlelib\Icons\openfolder.gif" />
<Content Include="idlelib\Icons\plusnode.gif" />
More information about the Python-checkins
mailing list