summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2015-11-16 12:32:19 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2015-11-16 12:32:19 (GMT)
commit3d0962222c9da8640ed26c3e41a768166c542606 (patch)
tree201b114da3d7982d16f30dab53c0c74bfd5b7f0a /Lib/idlelib
parent93ed946dd97a9c83de8caee79d7a4f24e428a365 (diff)
downloadcpython-3d0962222c9da8640ed26c3e41a768166c542606.zip
cpython-3d0962222c9da8640ed26c3e41a768166c542606.tar.gz
cpython-3d0962222c9da8640ed26c3e41a768166c542606.tar.bz2
Issue #24750: Improve appearance of IDLE editor window status bar.
Patch by Mark Roseman.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/EditorWindow.py3
-rw-r--r--Lib/idlelib/MultiStatusBar.py8
2 files changed, 8 insertions, 3 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index 4680f5c..0c5b713 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -184,6 +184,7 @@ class EditorWindow(object):
'name': 'text',
'padx': 5,
'wrap': 'none',
+ 'highlightthickness': 0,
'width': self.width,
'height': idleConf.GetOption('main', 'EditorWindow', 'height', type='int')}
if TkVersion >= 8.5:
@@ -410,6 +411,7 @@ class EditorWindow(object):
def set_status_bar(self):
self.status_bar = self.MultiStatusBar(self.top)
+ sep = Frame(self.top, height=1, borderwidth=1, background='grey75')
if sys.platform == "darwin":
# Insert some padding to avoid obscuring some of the statusbar
# by the resize widget.
@@ -417,6 +419,7 @@ class EditorWindow(object):
self.status_bar.set_label('column', 'Col: ?', side=RIGHT)
self.status_bar.set_label('line', 'Ln: ?', side=RIGHT)
self.status_bar.pack(side=BOTTOM, fill=X)
+ sep.pack(side=BOTTOM, fill=X)
self.text.bind("<<set-line-and-column>>", self.set_line_and_column)
self.text.event_add("<<set-line-and-column>>",
"<KeyRelease>", "<ButtonRelease>")
diff --git a/Lib/idlelib/MultiStatusBar.py b/Lib/idlelib/MultiStatusBar.py
index df136b8..5d52985 100644
--- a/Lib/idlelib/MultiStatusBar.py
+++ b/Lib/idlelib/MultiStatusBar.py
@@ -8,13 +8,15 @@ class MultiStatusBar(Frame):
Frame.__init__(self, master, **kw)
self.labels = {}
- def set_label(self, name, text='', side=LEFT):
+ def set_label(self, name, text='', side=LEFT, width=0):
if name not in self.labels:
- label = Label(self, bd=1, relief=SUNKEN, anchor=W)
- label.pack(side=side)
+ label = Label(self, borderwidth=0, anchor=W)
+ label.pack(side=side, pady=0, padx=4)
self.labels[name] = label
else:
label = self.labels[name]
+ if width != 0:
+ label.config(width=width)
label.config(text=text)
def _multistatus_bar(parent):