Michael Rabinovich Cursor commited on
Commit ·
5fb80c6
1
Parent(s): a435f45
leaderboard: widen gallery chrome reserve to kill residual outer scroll
Browse filesLive verification showed a constant ~56px outer-page overflow on smaller
screens (real HF chrome is a bit taller than the harness estimate). Bump
CHROME_RESERVE 560->620 and lower the box floor so the whole gallery fits
the viewport across screen sizes (single scroll).
Co-authored-by: Cursor <cursoragent@cursor.com>
- gallery.py +2 -2
gallery.py
CHANGED
|
@@ -600,11 +600,11 @@ function syncHeadHeight() {
|
|
| 600 |
// rather than the box plus an outer page scroll. Deliberately generous: a box
|
| 601 |
// that is a little short (a touch more in-box scrolling) is far better than a
|
| 602 |
// confusing second scrollbar.
|
| 603 |
-
var CHROME_RESERVE =
|
| 604 |
function sizeGalleryBox() {
|
| 605 |
try {
|
| 606 |
const avail = (window.screen && window.screen.availHeight) || 900;
|
| 607 |
-
const h = Math.max(
|
| 608 |
document.documentElement.style.setProperty('--gallery-max', h + 'px');
|
| 609 |
} catch (e) { /* keep CSS fallback */ }
|
| 610 |
}
|
|
|
|
| 600 |
// rather than the box plus an outer page scroll. Deliberately generous: a box
|
| 601 |
// that is a little short (a touch more in-box scrolling) is far better than a
|
| 602 |
// confusing second scrollbar.
|
| 603 |
+
var CHROME_RESERVE = 620;
|
| 604 |
function sizeGalleryBox() {
|
| 605 |
try {
|
| 606 |
const avail = (window.screen && window.screen.availHeight) || 900;
|
| 607 |
+
const h = Math.max(280, Math.min(760, Math.round(avail - CHROME_RESERVE)));
|
| 608 |
document.documentElement.style.setProperty('--gallery-max', h + 'px');
|
| 609 |
} catch (e) { /* keep CSS fallback */ }
|
| 610 |
}
|