mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 12:50:01 +00:00
NotchSticker: fix sticker support for newer iphone models
This commit is contained in:
parent
485353add1
commit
e0a65a5bc4
1 changed files with 12 additions and 0 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue