From 2713c7577edabf1356092d5c8aa72842870275ef Mon Sep 17 00:00:00 2001 From: Matthias Van Parijs Date: Fri, 20 Sep 2024 00:09:26 +0200 Subject: [PATCH] chore: Updated volume icons --- .../player/lib/ui/components/VolumeButton.tsx | 15 +++++++++++---- packages/player/lib/ui/icons/volume-0.svg | 4 +--- packages/player/lib/ui/icons/volume-1.svg | 5 +---- packages/player/lib/ui/icons/volume-2.svg | 6 +----- packages/player/lib/ui/icons/volume-muted.svg | 7 +------ 5 files changed, 15 insertions(+), 22 deletions(-) diff --git a/packages/player/lib/ui/components/VolumeButton.tsx b/packages/player/lib/ui/components/VolumeButton.tsx index 003fa31a..a90ccfe3 100644 --- a/packages/player/lib/ui/components/VolumeButton.tsx +++ b/packages/player/lib/ui/components/VolumeButton.tsx @@ -31,16 +31,23 @@ export function VolumeButton({ volume, setVolume }: VolumeButtonProps) { } }; - let Icon = VolumeMutedIcon; + let Icon; let iconStyle: CSSProperties = {}; if (volume > 0.8) { Icon = Volume2Icon; + iconStyle.width = iconStyle.height = "1.6rem"; } else if (volume > 0.5) { Icon = Volume1Icon; - iconStyle.left = "-1px"; + iconStyle.width = iconStyle.height = "1.4rem"; + iconStyle.left = "-0.1rem"; } else if (volume > 0.2) { Icon = Volume0Icon; - iconStyle.left = "-2px"; + iconStyle.width = iconStyle.height = "1.07rem"; + iconStyle.left = "-0.48rem"; + } else { + Icon = VolumeMutedIcon; + iconStyle.width = iconStyle.height = "1.3rem"; + iconStyle.left = "-0.16rem"; } return ( @@ -77,7 +84,7 @@ export function VolumeButton({ volume, setVolume }: VolumeButtonProps) { idleTime={0} > diff --git a/packages/player/lib/ui/icons/volume-0.svg b/packages/player/lib/ui/icons/volume-0.svg index 457f7364..792ab0e2 100644 --- a/packages/player/lib/ui/icons/volume-0.svg +++ b/packages/player/lib/ui/icons/volume-0.svg @@ -1,4 +1,2 @@ - - - \ No newline at end of file + \ No newline at end of file diff --git a/packages/player/lib/ui/icons/volume-1.svg b/packages/player/lib/ui/icons/volume-1.svg index 497c0874..3d09c205 100644 --- a/packages/player/lib/ui/icons/volume-1.svg +++ b/packages/player/lib/ui/icons/volume-1.svg @@ -1,5 +1,2 @@ - - - - \ No newline at end of file + \ No newline at end of file diff --git a/packages/player/lib/ui/icons/volume-2.svg b/packages/player/lib/ui/icons/volume-2.svg index 7b00c635..fc2f535c 100644 --- a/packages/player/lib/ui/icons/volume-2.svg +++ b/packages/player/lib/ui/icons/volume-2.svg @@ -1,6 +1,2 @@ - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/packages/player/lib/ui/icons/volume-muted.svg b/packages/player/lib/ui/icons/volume-muted.svg index 47558fa0..a8f457c7 100644 --- a/packages/player/lib/ui/icons/volume-muted.svg +++ b/packages/player/lib/ui/icons/volume-muted.svg @@ -1,7 +1,2 @@ - - - - - - \ No newline at end of file + \ No newline at end of file