Redesign the picture-in-picture window (#9800)
* Remove unnecessary PipContainer component * Redesign the picture-in-picture window * Add a hover effect to the controls * Clarify that WidgetPip has call-specific behavior
This commit is contained in:
parent
6b155620e4
commit
cb1af0d3de
28 changed files with 491 additions and 328 deletions
|
@ -30,6 +30,7 @@
|
|||
@import "./components/views/location/_ZoomButtons.pcss";
|
||||
@import "./components/views/messages/_MBeaconBody.pcss";
|
||||
@import "./components/views/messages/shared/_MediaProcessingError.pcss";
|
||||
@import "./components/views/pips/_WidgetPip.pcss";
|
||||
@import "./components/views/settings/devices/_CurrentDeviceSection.pcss";
|
||||
@import "./components/views/settings/devices/_DeviceDetailHeading.pcss";
|
||||
@import "./components/views/settings/devices/_DeviceDetails.pcss";
|
||||
|
@ -373,7 +374,6 @@
|
|||
@import "./views/voip/_LegacyCallViewForRoom.pcss";
|
||||
@import "./views/voip/_LegacyCallViewHeader.pcss";
|
||||
@import "./views/voip/_LegacyCallViewSidebar.pcss";
|
||||
@import "./views/voip/_PiPContainer.pcss";
|
||||
@import "./views/voip/_VideoFeed.pcss";
|
||||
@import "./voice-broadcast/atoms/_LiveBadge.pcss";
|
||||
@import "./voice-broadcast/atoms/_PlaybackControlButton.pcss";
|
||||
|
|
68
res/css/components/views/pips/_WidgetPip.pcss
Normal file
68
res/css/components/views/pips/_WidgetPip.pcss
Normal file
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
Copyright 2022 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
.mx_WidgetPip {
|
||||
width: 320px;
|
||||
height: 220px;
|
||||
border-radius: 8px;
|
||||
contain: paint;
|
||||
color: $call-primary-content;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mx_WidgetPip_header,
|
||||
.mx_WidgetPip_footer {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
height: 60px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
transition: opacity ease 0.15s;
|
||||
|
||||
.mx_WidgetPip:not(:hover) > & {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_WidgetPip_header {
|
||||
top: 0;
|
||||
padding: $spacing-12;
|
||||
display: flex;
|
||||
font-size: $font-12px;
|
||||
font-weight: $font-semi-bold;
|
||||
background: linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
|
||||
}
|
||||
|
||||
.mx_WidgetPip_backButton {
|
||||
height: $spacing-24;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: $spacing-12;
|
||||
|
||||
> .mx_Icon {
|
||||
color: $call-light-quaternary-content;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_WidgetPip_footer {
|
||||
bottom: 0;
|
||||
padding: $spacing-12 $spacing-8;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: flex-end;
|
||||
background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.9));
|
||||
}
|
|
@ -68,7 +68,7 @@ limitations under the License.
|
|||
&.mx_LegacyCallEvent_rejected,
|
||||
&.mx_LegacyCallEvent_noAnswer {
|
||||
.mx_LegacyCallEvent_type_icon::before {
|
||||
mask-image: url("$(res)/img/voip/declined-voice.svg");
|
||||
mask-image: url("$(res)/img/element-icons/call/hangup.svg");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
$MiniAppTileHeight: 200px;
|
||||
$MiniAppTileHeight: 220px;
|
||||
/* TODO this should be 300px but that's too large */
|
||||
$MinWidth: 240px;
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ limitations under the License.
|
|||
background-color: $alert;
|
||||
|
||||
&::before {
|
||||
mask-image: url("$(res)/img/voip/call-view/hangup.svg");
|
||||
mask-image: url("$(res)/img/element-icons/call/hangup.svg");
|
||||
background-color: white; /* Same on both themes */
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ limitations under the License.
|
|||
height: 100%;
|
||||
border: none;
|
||||
border-radius: inherit;
|
||||
background-color: $call-lobby-background;
|
||||
background-color: $call-background;
|
||||
}
|
||||
|
||||
/* While the lobby is shown, the widget needs to stay loaded but hidden in the background */
|
||||
|
@ -44,10 +44,10 @@ limitations under the License.
|
|||
min-height: 0;
|
||||
flex-grow: 1;
|
||||
padding: $spacing-12;
|
||||
color: $call-lobby-primary-content;
|
||||
background-color: $call-lobby-background;
|
||||
color: $call-primary-content;
|
||||
background-color: $call-background;
|
||||
|
||||
--facepile-background: $call-lobby-background;
|
||||
--facepile-background: $call-background;
|
||||
border-radius: 8px;
|
||||
|
||||
display: flex;
|
||||
|
@ -66,7 +66,7 @@ limitations under the License.
|
|||
width: 100%;
|
||||
max-width: 800px;
|
||||
aspect-ratio: 1.5;
|
||||
background-color: $call-lobby-system;
|
||||
background-color: $call-system;
|
||||
|
||||
border-radius: 20px;
|
||||
overflow: hidden;
|
||||
|
@ -104,7 +104,7 @@ limitations under the License.
|
|||
left: 0;
|
||||
right: 0;
|
||||
|
||||
background-color: rgba($call-lobby-background, 0.9);
|
||||
background-color: rgba($call-background, 0.9);
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
@ -120,7 +120,7 @@ limitations under the License.
|
|||
width: $size;
|
||||
height: $size;
|
||||
|
||||
background-color: $call-lobby-system;
|
||||
background-color: $call-system;
|
||||
border-radius: calc($size / 2);
|
||||
|
||||
&::before {
|
||||
|
@ -129,7 +129,7 @@ limitations under the License.
|
|||
mask-repeat: no-repeat;
|
||||
mask-size: 20px;
|
||||
mask-position: center;
|
||||
background-color: $call-lobby-primary-content;
|
||||
background-color: $call-primary-content;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ limitations under the License.
|
|||
width: $size;
|
||||
height: $size;
|
||||
|
||||
background-color: $call-lobby-system;
|
||||
background-color: $call-system;
|
||||
border-radius: calc($size / 2);
|
||||
|
||||
&::before {
|
||||
|
@ -162,7 +162,7 @@ limitations under the License.
|
|||
mask-image: url("$(res)/img/feather-customised/chevron-down.svg");
|
||||
mask-size: $size;
|
||||
mask-position: center;
|
||||
background-color: $call-lobby-primary-content;
|
||||
background-color: $call-primary-content;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
@ -171,10 +171,10 @@ limitations under the License.
|
|||
&.mx_CallView_deviceButtonWrapper_muted {
|
||||
.mx_CallView_deviceButton,
|
||||
.mx_CallView_deviceListButton {
|
||||
background-color: $call-lobby-primary-content;
|
||||
background-color: $call-primary-content;
|
||||
|
||||
&::before {
|
||||
background-color: $call-lobby-system;
|
||||
background-color: $call-system;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ limitations under the License.
|
|||
left: 0;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
|
||||
pointer-events: initial; /* restore pointer events so the user can leave/interact */
|
||||
/* Display above any widget elements */
|
||||
z-index: 102;
|
||||
|
||||
.mx_VideoFeed_remote.mx_VideoFeed_voice {
|
||||
min-height: 150px;
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
.mx_PiPContainer {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
bottom: 72px;
|
||||
z-index: 100;
|
||||
|
||||
/* Disable pointer events for Jitsi widgets to function. Direct */
|
||||
/* calls have their own cursor and behaviour, but we need to make */
|
||||
/* sure the cursor hits the iframe for Jitsi which will be at a */
|
||||
/* different level. */
|
||||
pointer-events: none;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue