fix(ui): opening the chat window keeps the minimised bar's width
This commit is contained in:
1 file changed
+5
-1
@@ -28,6 +28,8 @@ import {
|
||||
SWIPE,
|
||||
barPlacement,
|
||||
fitRect,
|
||||
BAR_W,
|
||||
INSET,
|
||||
handleOrientation,
|
||||
handleValue,
|
||||
keyboardCover,
|
||||
@@ -118,7 +120,9 @@ const winRect = computed<Rect>(() => {
|
||||
if (pinned.value) {
|
||||
return { x: mode.value === "left" ? 0 : vw.value - pinW.value, y: 0, w: pinW.value, h: vh.value };
|
||||
}
|
||||
return fitRect(layout.value, vw.value, vh.value);
|
||||
// Opening the window never narrows it below the minimised bar.
|
||||
const minW = Math.min(BAR_W, vw.value - INSET * 2);
|
||||
return fitRect({ ...layout.value, w: Math.max(layout.value.w, minW) }, vw.value, vh.value);
|
||||
});
|
||||
|
||||
// The part of the layout viewport the on-screen keyboard covers, and the height
|
||||
|
||||
Reference in new issue
Block a user