From ecb3e7a1972797b1cb07c5527f9daf14fa2e59c9 Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Mon, 2 Jan 2023 14:36:58 +0100 Subject: [PATCH] Use compound Mic icons everywhere (#9849) --- res/css/views/rooms/_MessageComposer.pcss | 2 +- .../views/voip/LegacyCallView/_LegacyCallViewButtons.pcss | 8 ++++++-- res/css/views/voip/_CallView.pcss | 6 ++++-- res/css/views/voip/_VideoFeed.pcss | 8 ++++---- res/img/element-icons/Mic-off.svg | 5 +++++ res/img/element-icons/{Mic.svg => mic.svg} | 0 res/img/voip/call-view/mic-off.svg | 3 --- res/img/voip/call-view/mic-on.svg | 3 --- res/img/voip/mic-muted.svg | 5 ----- res/img/voip/mic-on-mask.svg | 3 --- res/img/voip/mic-unmuted.svg | 4 ---- .../components/atoms/VoiceBroadcastHeader.tsx | 2 +- .../components/molecules/VoiceBroadcastRecordingPip.tsx | 2 +- 13 files changed, 22 insertions(+), 29 deletions(-) create mode 100644 res/img/element-icons/Mic-off.svg rename res/img/element-icons/{Mic.svg => mic.svg} (100%) delete mode 100644 res/img/voip/call-view/mic-off.svg delete mode 100644 res/img/voip/call-view/mic-on.svg delete mode 100644 res/img/voip/mic-muted.svg delete mode 100644 res/img/voip/mic-on-mask.svg delete mode 100644 res/img/voip/mic-unmuted.svg diff --git a/res/css/views/rooms/_MessageComposer.pcss b/res/css/views/rooms/_MessageComposer.pcss index b1a256cb4f..cde4de395a 100644 --- a/res/css/views/rooms/_MessageComposer.pcss +++ b/res/css/views/rooms/_MessageComposer.pcss @@ -254,7 +254,7 @@ limitations under the License. } .mx_MessageComposer_voiceMessage::before { - mask-image: url("$(res)/img/voip/mic-on-mask.svg"); + mask-image: url("$(res)/img/element-icons/mic.svg"); } .mx_MessageComposer_voiceBroadcast::before { diff --git a/res/css/views/voip/LegacyCallView/_LegacyCallViewButtons.pcss b/res/css/views/voip/LegacyCallView/_LegacyCallViewButtons.pcss index 8127c163fe..ebc1652999 100644 --- a/res/css/views/voip/LegacyCallView/_LegacyCallViewButtons.pcss +++ b/res/css/views/voip/LegacyCallView/_LegacyCallViewButtons.pcss @@ -94,7 +94,9 @@ limitations under the License. } &.mx_LegacyCallViewButtons_button_mic::before { - mask-image: url("$(res)/img/voip/call-view/mic-on.svg"); + height: 20px; + mask-image: url("$(res)/img/element-icons/mic.svg"); + width: 20px; } &.mx_LegacyCallViewButtons_button_vid::before { @@ -123,7 +125,9 @@ limitations under the License. } &.mx_LegacyCallViewButtons_button_mic::before { - mask-image: url("$(res)/img/voip/call-view/mic-off.svg"); + height: 20px; + mask-image: url("$(res)/img/element-icons/Mic-off.svg"); + width: 20px; } &.mx_LegacyCallViewButtons_button_vid::before { diff --git a/res/css/views/voip/_CallView.pcss b/res/css/views/voip/_CallView.pcss index 0869a29a8a..b320d8588e 100644 --- a/res/css/views/voip/_CallView.pcss +++ b/res/css/views/voip/_CallView.pcss @@ -135,7 +135,8 @@ limitations under the License. } &.mx_CallView_deviceButton_audio::before { - mask-image: url("$(res)/img/voip/call-view/mic-on.svg"); + mask-image: url("$(res)/img/element-icons/mic.svg"); + mask-size: 14px; } &.mx_CallView_deviceButton_video::before { @@ -179,7 +180,8 @@ limitations under the License. .mx_CallView_deviceButton { &.mx_CallView_deviceButton_audio::before { - mask-image: url("$(res)/img/voip/call-view/mic-off.svg"); + mask-image: url("$(res)/img/element-icons/Mic-off.svg"); + mask-size: 14px; } &.mx_CallView_deviceButton_video::before { diff --git a/res/css/views/voip/_VideoFeed.pcss b/res/css/views/voip/_VideoFeed.pcss index 6a9810e07b..53d00c12f8 100644 --- a/res/css/views/voip/_VideoFeed.pcss +++ b/res/css/views/voip/_VideoFeed.pcss @@ -70,8 +70,8 @@ limitations under the License. &::before { position: absolute; content: ""; - width: 16px; - height: 16px; + width: 17px; + height: 17px; mask-repeat: no-repeat; mask-size: contain; mask-position: center; @@ -80,11 +80,11 @@ limitations under the License. } &.mx_VideoFeed_mic_muted::before { - mask-image: url("$(res)/img/voip/mic-muted.svg"); + mask-image: url("$(res)/img/element-icons/Mic-off.svg"); } &.mx_VideoFeed_mic_unmuted::before { - mask-image: url("$(res)/img/voip/mic-unmuted.svg"); + mask-image: url("$(res)/img/element-icons/mic.svg"); } } } diff --git a/res/img/element-icons/Mic-off.svg b/res/img/element-icons/Mic-off.svg new file mode 100644 index 0000000000..0bf1c3f922 --- /dev/null +++ b/res/img/element-icons/Mic-off.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/res/img/element-icons/Mic.svg b/res/img/element-icons/mic.svg similarity index 100% rename from res/img/element-icons/Mic.svg rename to res/img/element-icons/mic.svg diff --git a/res/img/voip/call-view/mic-off.svg b/res/img/voip/call-view/mic-off.svg deleted file mode 100644 index 74d821e625..0000000000 --- a/res/img/voip/call-view/mic-off.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/res/img/voip/call-view/mic-on.svg b/res/img/voip/call-view/mic-on.svg deleted file mode 100644 index 317d10b296..0000000000 --- a/res/img/voip/call-view/mic-on.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/res/img/voip/mic-muted.svg b/res/img/voip/mic-muted.svg deleted file mode 100644 index 0cb7ad1c9e..0000000000 --- a/res/img/voip/mic-muted.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/res/img/voip/mic-on-mask.svg b/res/img/voip/mic-on-mask.svg deleted file mode 100644 index 418316b164..0000000000 --- a/res/img/voip/mic-on-mask.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/res/img/voip/mic-unmuted.svg b/res/img/voip/mic-unmuted.svg deleted file mode 100644 index 8334cafa0a..0000000000 --- a/res/img/voip/mic-unmuted.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/voice-broadcast/components/atoms/VoiceBroadcastHeader.tsx b/src/voice-broadcast/components/atoms/VoiceBroadcastHeader.tsx index c0fdb20fd2..b4275cafc8 100644 --- a/src/voice-broadcast/components/atoms/VoiceBroadcastHeader.tsx +++ b/src/voice-broadcast/components/atoms/VoiceBroadcastHeader.tsx @@ -17,7 +17,7 @@ import classNames from "classnames"; import { LiveBadge, VoiceBroadcastLiveness } from "../.."; import { Icon as LiveIcon } from "../../../../res/img/element-icons/live.svg"; -import { Icon as MicrophoneIcon } from "../../../../res/img/voip/call-view/mic-on.svg"; +import { Icon as MicrophoneIcon } from "../../../../res/img/element-icons/mic.svg"; import { Icon as TimerIcon } from "../../../../res/img/element-icons/Timer.svg"; import { _t } from "../../../languageHandler"; import RoomAvatar from "../../../components/views/avatars/RoomAvatar"; diff --git a/src/voice-broadcast/components/molecules/VoiceBroadcastRecordingPip.tsx b/src/voice-broadcast/components/molecules/VoiceBroadcastRecordingPip.tsx index 1f97c5ba34..41ce540922 100644 --- a/src/voice-broadcast/components/molecules/VoiceBroadcastRecordingPip.tsx +++ b/src/voice-broadcast/components/molecules/VoiceBroadcastRecordingPip.tsx @@ -22,7 +22,7 @@ import { VoiceBroadcastHeader } from "../atoms/VoiceBroadcastHeader"; import { Icon as StopIcon } from "../../../../res/img/element-icons/Stop.svg"; import { Icon as PauseIcon } from "../../../../res/img/element-icons/pause.svg"; import { Icon as RecordIcon } from "../../../../res/img/element-icons/Record.svg"; -import { Icon as MicrophoneIcon } from "../../../../res/img/element-icons/Mic.svg"; +import { Icon as MicrophoneIcon } from "../../../../res/img/element-icons/mic.svg"; import { _t } from "../../../languageHandler"; import { useAudioDeviceSelection } from "../../../hooks/useAudioDeviceSelection"; import { DevicesContextMenu } from "../../../components/views/audio_messages/DevicesContextMenu";