Commit 6acf212
gh-75733: Show IDLE's trees in a ttk.Treeview
idlelib.tree drew its rows on a canvas, with hardcoded pixel sizes that
fit neither every font nor every monitor, an icon on every row, and
bindings of its own for clicks and scrolling. It now wraps a
ttk.Treeview, which takes its row height from the configured font and
its indicators, colors and keys from ttk and the theme.
Converted: the Module and Path browsers, Debug => Stack Viewer, the
object browsers, and the stack, Locals and Globals panes of the Debug
Control window. Rows carry more than a text now: an item fills the
columns of its row with GetValues, and says with GetTags what kind of
row it is, which is how the stack views show a frame as module,
function, line and source, and how the Path Browser tells a directory,
a package and a module apart.
The stack pane of the debugger marks the frame it stopped in with a
drawn arrow instead of a "> " in front of the text. The Locals and
Globals panes are read-only tables, as editing them never reached the
objects in the user process (gh-69184). The Module Browser shows no
icons, its text saying already whether a row is a class or a function
(gh-69277).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 57594aa commit 6acf212
19 files changed
Lines changed: 773 additions & 603 deletions
File tree
- Lib/idlelib
- Icons
- idle_test
- Misc/NEWS.d/next/IDLE
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
| 47 | + | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
Binary file not shown.
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
99 | | - | |
| 98 | + | |
100 | 99 | | |
101 | | - | |
102 | 100 | | |
103 | 101 | | |
104 | 102 | | |
| |||
117 | 115 | | |
118 | 116 | | |
119 | 117 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
130 | 124 | | |
131 | | - | |
132 | | - | |
| 125 | + | |
133 | 126 | | |
134 | 127 | | |
135 | 128 | | |
136 | 129 | | |
137 | 130 | | |
138 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
139 | 135 | | |
140 | 136 | | |
141 | 137 | | |
| |||
160 | 156 | | |
161 | 157 | | |
162 | 158 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | 159 | | |
168 | 160 | | |
169 | 161 | | |
170 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
171 | 167 | | |
172 | 168 | | |
173 | 169 | | |
| |||
213 | 209 | | |
214 | 210 | | |
215 | 211 | | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | 212 | | |
224 | 213 | | |
225 | 214 | | |
| |||
244 | 233 | | |
245 | 234 | | |
246 | 235 | | |
247 | | - | |
| 236 | + | |
248 | 237 | | |
249 | 238 | | |
250 | 239 | | |
| |||
0 commit comments