mirror of
https://github.com/element-hq/element-call.git
synced 2026-10-23 21:44:23 +00:00
Consider any sufficiently short window 'flat'
This is because our layouts for flat windows are good at adapting to both small width and small height, while our layouts for narrow windows aren't so good at adapting to a small height.
This commit is contained in:
1 parent
f0f9b929a1
commit
6d8e45aea8
1 file changed
+4
-1
@@ -526,8 +526,11 @@ export class CallViewModel extends ViewModel {
|
||||
const height = window.innerHeight;
|
||||
const width = window.innerWidth;
|
||||
if (height <= 400 && width <= 340) return "pip";
|
||||
if (width <= 600) return "narrow";
|
||||
// Our layouts for flat windows are better at adapting to a small width
|
||||
// than our layouts for narrow windows are at adapting to a small height,
|
||||
// so we give "flat" precedence here
|
||||
if (height <= 660) return "flat";
|
||||
if (width <= 600) return "narrow";
|
||||
return "normal";
|
||||
}),
|
||||
distinctUntilChanged(),
|
||||
|
||||
Reference in new issue
Block a user