Commit 6f6cefa
committed
Drop the unused HeaderHeight constant and dedupe the header config build
Follow-up to review feedback on the shared-header redesign:
- Remove the HeaderHeight constant. Nothing referenced it (callers compute
height via HeaderHeightFor), and its doc described a "maximum" that
HeaderHeightFor does not actually enforce, so the comment was misleading.
- In the view and modify View() methods, build the header config once and reuse
it for both RenderHeader and the height reservation instead of rebuilding it
twice per frame. The click/scroll handlers keep deriving the height from the
same config, so the header's dimensions remain a single source of truth.1 parent a14cb55 commit 6f6cefa
3 files changed
Lines changed: 13 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1361 | 1361 | | |
1362 | 1362 | | |
1363 | 1363 | | |
| 1364 | + | |
1364 | 1365 | | |
1365 | | - | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
1366 | 1371 | | |
1367 | 1372 | | |
1368 | 1373 | | |
| |||
1392 | 1397 | | |
1393 | 1398 | | |
1394 | 1399 | | |
1395 | | - | |
| 1400 | + | |
1396 | 1401 | | |
1397 | 1402 | | |
1398 | 1403 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | 9 | | |
16 | 10 | | |
17 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| 363 | + | |
363 | 364 | | |
364 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
365 | 370 | | |
366 | 371 | | |
367 | 372 | | |
| |||
392 | 397 | | |
393 | 398 | | |
394 | 399 | | |
395 | | - | |
396 | 400 | | |
397 | 401 | | |
398 | 402 | | |
| |||
0 commit comments