mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 10:57:25 +02:00
Merge pull request #16276 from zfox23/moveMutedBanner
DEV-2275: Move 'input device muted' banner and make it slightly smaller
This commit is contained in:
commit
c9d0dc6991
1 changed files with 7 additions and 11 deletions
|
@ -296,7 +296,7 @@ function updateOutputDeviceMutedOverlay(isMuted) {
|
||||||
props.y = Window.innerHeight / 2 - overlayDims / 2;
|
props.y = Window.innerHeight / 2 - overlayDims / 2;
|
||||||
|
|
||||||
var outputDeviceMutedOverlayBottomY = props.y + overlayDims;
|
var outputDeviceMutedOverlayBottomY = props.y + overlayDims;
|
||||||
var inputDeviceMutedOverlayTopY = getInputDeviceMutedOverlayTopY();
|
var inputDeviceMutedOverlayTopY = INPUT_DEVICE_MUTED_MARGIN_TOP_PX;
|
||||||
if (outputDeviceMutedOverlayBottomY + OUTPUT_DEVICE_MUTED_MARGIN_BOTTOM_PX > inputDeviceMutedOverlayTopY) {
|
if (outputDeviceMutedOverlayBottomY + OUTPUT_DEVICE_MUTED_MARGIN_BOTTOM_PX > inputDeviceMutedOverlayTopY) {
|
||||||
overlayDims = 2 * (inputDeviceMutedOverlayTopY - Window.innerHeight / 2 - OUTPUT_DEVICE_MUTED_MARGIN_BOTTOM_PX);
|
overlayDims = 2 * (inputDeviceMutedOverlayTopY - Window.innerHeight / 2 - OUTPUT_DEVICE_MUTED_MARGIN_BOTTOM_PX);
|
||||||
}
|
}
|
||||||
|
@ -473,15 +473,11 @@ function maybeDeleteInputDeviceMutedOverlay() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getInputDeviceMutedOverlayTopY() {
|
|
||||||
return (Window.innerHeight - INPUT_DEVICE_MUTED_OVERLAY_DEFAULT_Y_PX - INPUT_DEVICE_MUTED_MARGIN_BOTTOM_PX);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
var inputDeviceMutedOverlay = false;
|
var inputDeviceMutedOverlay = false;
|
||||||
var INPUT_DEVICE_MUTED_OVERLAY_DEFAULT_X_PX = 353;
|
var INPUT_DEVICE_MUTED_OVERLAY_DEFAULT_X_PX = 237;
|
||||||
var INPUT_DEVICE_MUTED_OVERLAY_DEFAULT_Y_PX = 95;
|
var INPUT_DEVICE_MUTED_OVERLAY_DEFAULT_Y_PX = 64;
|
||||||
var INPUT_DEVICE_MUTED_MARGIN_BOTTOM_PX = 20 + TOP_BAR_HEIGHT_PX;
|
var INPUT_DEVICE_MUTED_MARGIN_LEFT_PX = 20;
|
||||||
|
var INPUT_DEVICE_MUTED_MARGIN_TOP_PX = 20;
|
||||||
function updateInputDeviceMutedOverlay(isMuted) {
|
function updateInputDeviceMutedOverlay(isMuted) {
|
||||||
if (isMuted) {
|
if (isMuted) {
|
||||||
var props = {
|
var props = {
|
||||||
|
@ -490,8 +486,8 @@ function updateInputDeviceMutedOverlay(isMuted) {
|
||||||
};
|
};
|
||||||
props.width = INPUT_DEVICE_MUTED_OVERLAY_DEFAULT_X_PX;
|
props.width = INPUT_DEVICE_MUTED_OVERLAY_DEFAULT_X_PX;
|
||||||
props.height = INPUT_DEVICE_MUTED_OVERLAY_DEFAULT_Y_PX;
|
props.height = INPUT_DEVICE_MUTED_OVERLAY_DEFAULT_Y_PX;
|
||||||
props.x = Window.innerWidth / 2 - INPUT_DEVICE_MUTED_OVERLAY_DEFAULT_X_PX / 2;
|
props.x = INPUT_DEVICE_MUTED_MARGIN_LEFT_PX;
|
||||||
props.y = getInputDeviceMutedOverlayTopY();
|
props.y = INPUT_DEVICE_MUTED_MARGIN_TOP_PX;
|
||||||
if (inputDeviceMutedOverlay) {
|
if (inputDeviceMutedOverlay) {
|
||||||
Overlays.editOverlay(inputDeviceMutedOverlay, props);
|
Overlays.editOverlay(inputDeviceMutedOverlay, props);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue