Commit 5153b2f7 authored by Kurt B. Kaiser's avatar Kurt B. Kaiser

Incorporate Tal Einat's comment on Patch 936169: Fixes alignment problem.

parent d8e73430
...@@ -55,18 +55,25 @@ class CodeContext: ...@@ -55,18 +55,25 @@ class CodeContext:
def toggle_code_context_event(self, event=None): def toggle_code_context_event(self, event=None):
if not self.label: if not self.label:
self.label = Tkinter.Label(self.editwin.top, self.pad_frame = Tkinter.Frame(self.editwin.top,
bg=self.bgcolor, border=2,
relief="sunken")
self.label = Tkinter.Label(self.pad_frame,
text="\n" * (self.context_depth - 1), text="\n" * (self.context_depth - 1),
anchor="w", justify="left", anchor="w", justify="left",
font=self.textfont, font=self.textfont,
bg=self.bgcolor, fg=self.fgcolor, bg=self.bgcolor, fg=self.fgcolor,
relief="sunken", border=0,
width=1, # Don't request more than we get width=1, # Don't request more than we get
) )
self.label.pack(side="top", fill="x", expand=0, self.label.pack(side="top", fill="x", expand=True,
after=self.editwin.status_bar) padx=4, pady=0)
self.pad_frame.pack(side="top", fill="x", expand=False,
padx=0, pady=0,
after=self.editwin.status_bar)
else: else:
self.label.destroy() self.label.destroy()
self.pad_frame.destroy()
self.label = None self.label = None
idleConf.SetOption("extensions", "CodeContext", "visible", idleConf.SetOption("extensions", "CodeContext", "visible",
str(self.label is not None)) str(self.label is not None))
......
...@@ -3,6 +3,8 @@ What's New in IDLE 1.2a0? ...@@ -3,6 +3,8 @@ What's New in IDLE 1.2a0?
*Release date: XX-XXX-2005* *Release date: XX-XXX-2005*
- Fixed CodeContext alignment problem, following suggestion from Tal Einat.
- Increased performance in CodeContext extension Patch 936169 Noam Raphael - Increased performance in CodeContext extension Patch 936169 Noam Raphael
- Mac line endings were incorrect when pasting code from some browsers - Mac line endings were incorrect when pasting code from some browsers
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment