summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2001-12-31 08:58:44 (GMT)
committerJust van Rossum <just@letterror.com>2001-12-31 08:58:44 (GMT)
commit20a03d1c9a72bd4a482965901300c760e339d723 (patch)
tree1feb5eda875a2501fc912ede759f59ff0dc37555 /Mac
parentbdb9d487b2a905edccf425ad04d56835a6ccd38d (diff)
downloadcpython-20a03d1c9a72bd4a482965901300c760e339d723.zip
cpython-20a03d1c9a72bd4a482965901300c760e339d723.tar.gz
cpython-20a03d1c9a72bd4a482965901300c760e339d723.tar.bz2
made radio button labels readable under OSX
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Tools/IDE/ProfileBrowser.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/Mac/Tools/IDE/ProfileBrowser.py b/Mac/Tools/IDE/ProfileBrowser.py
index 51ba75c..b3e9d99 100644
--- a/Mac/Tools/IDE/ProfileBrowser.py
+++ b/Mac/Tools/IDE/ProfileBrowser.py
@@ -30,16 +30,17 @@ class ProfileBrowser:
self.w.divline = W.HorizontalLine((0, 20, 0, 0))
self.w.titlebar = W.TextBox((4, 4, 40, 12), 'Sort by:')
self.buttons = []
- self.w.button_calls = W.RadioButton((54, 4, 45, 12), 'calls', self.buttons, self.setsort)
- self.w.button_time = W.RadioButton((104, 4, 40, 12), 'time', self.buttons, self.setsort)
- self.w.button_cumulative = W.RadioButton((154, 4, 75, 12), 'cumulative', self.buttons, self.setsort)
- self.w.button_stdname = W.RadioButton((234, 4, 60, 12), 'stdname', self.buttons, self.setsort)
+ x = 54
+ width1 = 50
+ width2 = 75
+ for name in ["calls", "time", "cumulative", "stdname", "file", "line", "name"]:
+ if len(name) > 6:
+ width = width2
+ else:
+ width = width1
+ self.w["button_" + name] = W.RadioButton((x, 4, width, 12), name, self.buttons, self.setsort)
+ x += width + 10
self.w.button_calls.set(1)
- self.w.button_file = W.RadioButton((304, 4, 40, 12), 'file', self.buttons, self.setsort)
- self.w.button_line = W.RadioButton((354, 4, 50, 12), 'line', self.buttons, self.setsort)
- self.w.button_name = W.RadioButton((404, 4, 50, 12), 'name', self.buttons, self.setsort)
-## self.w.button_nfl = W.RadioButton((4, 4, 12, 12), 'nfl', self.buttons, self.setsort)
-## self.w.button_pcalls = W.RadioButton((4, 4, 12, 12), 'pcalls', self.buttons, self.setsort)
self.w.text = W.TextEditor((0, 21, -15, -15), inset = (6, 5),
readonly = 1, wrap = 0, fontsettings = ('Monaco', 0, 9, (0, 0, 0)))
self.w._bary = W.Scrollbar((-15, 20, 16, -14), self.w.text.vscroll, max = 32767)