diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index fbede376c..b7965f778 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -311,6 +311,8 @@ "fullscreenPlayer": { "config": { "dynamicBackground": "dynamic background", + "dynamicImageBlur": "image blur size", + "dynamicIsImage": "enable background image", "followCurrentLyric": "follow current lyric", "lyricAlignment": "lyric alignment", "lyricGap": "lyric gap", diff --git a/src/renderer/features/player/components/full-screen-player.tsx b/src/renderer/features/player/components/full-screen-player.tsx index 970f52e42..edb8e320f 100644 --- a/src/renderer/features/player/components/full-screen-player.tsx +++ b/src/renderer/features/player/components/full-screen-player.tsx @@ -60,7 +60,11 @@ const ResponsiveContainer = styled.div` } `; -const BackgroundImageOverlay = styled.div` +interface BackgroundImageOverlayProps { + $blur: number; +} + +const BackgroundImageOverlay = styled.div` position: absolute; top: 0; left: 0; @@ -68,12 +72,21 @@ const BackgroundImageOverlay = styled.div` width: 100%; height: 100%; background: var(--bg-header-overlay); + backdrop-filter: blur(${({ $blur }) => $blur}rem); `; +const mainBackground = 'var(--main-bg)'; + const Controls = () => { const { t } = useTranslation(); - const { dynamicBackground, expanded, opacity, useImageAspectRatio } = - useFullScreenPlayerStore(); + const { + dynamicBackground, + dynamicImageBlur, + dynamicIsImage, + expanded, + opacity, + useImageAspectRatio, + } = useFullScreenPlayerStore(); const { setStore } = useFullScreenPlayerStoreActions(); const { setSettings } = useSettingsStoreActions(); const lyricConfig = useLyricsSettings(); @@ -141,6 +154,45 @@ const Controls = () => { /> + {dynamicBackground && ( + + )} + {dynamicBackground && dynamicIsImage && ( + + )} {dynamicBackground && (