summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2005-10-03 20:08:25 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2005-10-03 20:08:25 (GMT)
commit389482ccbe6378f039667aa5db3192bbabec741c (patch)
tree147acee85d238c53c556a4ce2653669690b611a7 /Lib/idlelib
parent0a1357930aab1be5bebc89ac58cd7a946296c114 (diff)
downloadcpython-389482ccbe6378f039667aa5db3192bbabec741c.zip
cpython-389482ccbe6378f039667aa5db3192bbabec741c.tar.gz
cpython-389482ccbe6378f039667aa5db3192bbabec741c.tar.bz2
Incorporate Tal Einat's comment on Patch 936169: Fixes alignment problem.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/CodeContext.py15
-rw-r--r--Lib/idlelib/NEWS.txt2
2 files changed, 13 insertions, 4 deletions
diff --git a/Lib/idlelib/CodeContext.py b/Lib/idlelib/CodeContext.py
index 5d67066..5d55f77 100644
--- a/Lib/idlelib/CodeContext.py
+++ b/Lib/idlelib/CodeContext.py
@@ -55,18 +55,25 @@ class CodeContext:
def toggle_code_context_event(self, event=None):
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),
anchor="w", justify="left",
font=self.textfont,
bg=self.bgcolor, fg=self.fgcolor,
- relief="sunken",
+ border=0,
width=1, # Don't request more than we get
)
- self.label.pack(side="top", fill="x", expand=0,
- after=self.editwin.status_bar)
+ self.label.pack(side="top", fill="x", expand=True,
+ padx=4, pady=0)
+ self.pad_frame.pack(side="top", fill="x", expand=False,
+ padx=0, pady=0,
+ after=self.editwin.status_bar)
else:
self.label.destroy()
+ self.pad_frame.destroy()
self.label = None
idleConf.SetOption("extensions", "CodeContext", "visible",
str(self.label is not None))
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt
index 1084705..898f2c2 100644
--- a/Lib/idlelib/NEWS.txt
+++ b/Lib/idlelib/NEWS.txt
@@ -3,6 +3,8 @@ What's New in IDLE 1.2a0?
*Release date: XX-XXX-2005*
+- Fixed CodeContext alignment problem, following suggestion from Tal Einat.
+
- Increased performance in CodeContext extension Patch 936169 Noam Raphael
- Mac line endings were incorrect when pasting code from some browsers