mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
fix(app): pixel-align mobile status indicator notch (#3399)
This commit is contained in:
1 parent
5b3f69bf27
commit
be314788b3
1 file changed
+2
-1
@@ -145,7 +145,8 @@ function calculateStatusGeometry(avatarSize: number, isMobile: boolean = false):
|
|||||||
return baseGeometry;
|
return baseGeometry;
|
||||||
}
|
}
|
||||||
const phoneWidth = statusSize;
|
const phoneWidth = statusSize;
|
||||||
const phoneHeight = Math.round(phoneWidth / DESIGN_RULES.mobileAspectRatio) + DESIGN_RULES.mobilePhoneExtraHeight;
|
const phoneHeight =
|
||||||
|
Math.round((phoneWidth / DESIGN_RULES.mobileAspectRatio + DESIGN_RULES.mobilePhoneExtraHeight) / 2) * 2;
|
||||||
const phoneRx = Math.round(phoneWidth * DESIGN_RULES.mobileCornerRadius);
|
const phoneRx = Math.round(phoneWidth * DESIGN_RULES.mobileCornerRadius);
|
||||||
const bezelHeight = Math.max(1, Math.round(phoneHeight * 0.05));
|
const bezelHeight = Math.max(1, Math.round(phoneHeight * 0.05));
|
||||||
const phoneX = cutoutCenter - phoneWidth / 2;
|
const phoneX = cutoutCenter - phoneWidth / 2;
|
||||||
|
|||||||
Reference in new issue
Block a user