NotchSticker: fix sticker support for newer iphone models

This commit is contained in:
dumbmoron 2024-10-01 17:02:44 +00:00
parent 485353add1
commit e0a65a5bc4
No known key found for this signature in database

View file

@ -11,9 +11,12 @@
$: state = "hidden"; // "notch", "island", "notch x" $: state = "hidden"; // "notch", "island", "notch x"
const islandValues = [ const islandValues = [
53, // 16 pro max: larger text
59, // regular & plus: default 59, // regular & plus: default
48, // regular: larger text 48, // regular: larger text
49, // 16: larger text
51, // plus only: larger text 51, // plus only: larger text
62, // 16: regular
]; ];
const xNotch = [44]; const xNotch = [44];
@ -49,6 +52,11 @@
if (safeAreaTop === 48 && safeAreaBottom === 34) { if (safeAreaTop === 48 && safeAreaBottom === 34) {
state = "notch"; state = "notch";
} }
// exception for iPhone 16 Pro Max
if (safeAreaTop === 53 && safeAreaBottom === 29) {
state = "notch sixteen-pro-max";
}
} }
</script> </script>
@ -77,6 +85,10 @@
padding-top: 2px; padding-top: 2px;
} }
#cobalt-notch-sticker.sixteen-pro-max {
padding-top: 12px;
}
#cobalt-notch-sticker.notch.x :global(svg) { #cobalt-notch-sticker.notch.x :global(svg) {
height: 28px; height: 28px;
} }