8000 bpo-24813: IDLE: Add icon to help_about by csabella · Pull Request #2335 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-24813: IDLE: Add icon to help_about #2335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 23, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
bpo-24813: IDLE: Add icon to help_about
  • Loading branch information
csabella committed Jun 23, 2017
commit 3b456dc2c10a9e6d3b85c80c9d456aea32f44402
12 changes: 6 additions & 6 deletions Lib/idlelib/help_about.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from sys import version

from tkinter import Toplevel, Frame, Label, Button, PhotoImage
from tkinter import SUNKEN, TOP, BOTTOM, LEFT, X, BOTH, W, EW, NSEW, NE
from tkinter import SUNKEN, TOP, BOTTOM, LEFT, X, BOTH, W, EW, NSEW, E

from idlelib import textview

Expand Down Expand Up @@ -62,15 +62,15 @@ def create_widgets(self):

header = Label(frame_background, text='IDLE', fg=self.fg,
bg=self.bg, font=('courier', 24, 'bold'))
header.grid(row=0, column=0, sticky=W, padx=10, pady=10)
header.grid(row=0, column=0, sticky=E, padx=10, pady=10)

tk_patchlevel = self.tk.call('info', 'patchlevel')
ext = '.png' if tk_patchlevel >= '8.6' else '.gif'
iconfn = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'Icons', f'idle_48{ext}')
self.icon_image = PhotoImage(master=self._root(), file=iconfn)
icon = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'Icons', f'idle_48{ext}')
self.icon_image = PhotoImage(master=self._root(), file=icon)
logo = Label(frame_background, image=self.icon_image, bg=self.bg)
logo.grid(row=0, column=0, sticky=NE, rowspan=2, padx=10, pady=10)
logo.grid(row=0, column=0, sticky=W, rowspan=2, padx=10, pady=10)

byline_text = "Python's Integrated DeveLopment Environment" + 5*'\n'
byline = Label(frame_background, text=byline_text, justify=LEFT,
Expand Down
0