Commit c274237
committed
fix: share title bar bounds between load and resize
The initial bounds in load() spanned the full content width with no inset,
while _resizeViews() insets by 1px on non-macOS, so the title bar gapped by a
pixel on the first paint until the first resize corrected it. Compute the
bounds once in _titleBarBounds() and use it from both so the first paint
matches every later resize.
Note: AI-assisted (Claude Code). Manually verified: tsc and eslint clean, added a unit test for the macOS and non-macOS rects and confirmed it fails when the inset is removed.1 parent 380eb7d commit c274237
2 files changed
Lines changed: 53 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
| 173 | + | |
180 | 174 | | |
181 | 175 | | |
182 | 176 | | |
| |||
1218 | 1212 | | |
1219 | 1213 | | |
1220 | 1214 | | |
1221 | | - | |
1222 | | - | |
1223 | | - | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
1224 | 1220 | | |
1225 | | - | |
| 1221 | + | |
1226 | 1222 | | |
1227 | 1223 | | |
1228 | 1224 | | |
1229 | 1225 | | |
1230 | | - | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
1231 | 1232 | | |
1232 | 1233 | | |
1233 | 1234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
0 commit comments