Commit c8938bb
committed
Slightly tighten the _get_layout_cache_key API.
_get_layout_cache_key is only ever called from _get_layout, which always
passes a renderer arg which is never None (_get_layout calls
`renderer.get_text_width_height_descent immediately after). So we can
make the `renderer` arg required and not check for None.
Also, get_unitless_position() can be directly used instead of unpacking
it.1 parent 0ae666b commit c8938bb
1 file changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
281 | | - | |
282 | 280 | | |
283 | | - | |
| 281 | + | |
| 282 | + | |
284 | 283 | | |
285 | 284 | | |
286 | 285 | | |
| |||
0 commit comments