From 1efdd40f99cb1ad52f048bd53648f32b4cfbbae8 Mon Sep 17 00:00:00 2001 From: Innei Date: Mon, 19 Aug 2024 15:00:02 +0800 Subject: [PATCH] fix: font name duplicated if installed default font Signed-off-by: Innei --- src/main/window.ts | 2 +- .../ui/background/{vibrancy.tsx => WindowUnderBlur.tsx} | 2 +- src/renderer/src/components/ui/background/index.ts | 2 +- src/renderer/src/modules/settings/modules/fonts.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename src/renderer/src/components/ui/background/{vibrancy.tsx => WindowUnderBlur.tsx} (94%) diff --git a/src/main/window.ts b/src/main/window.ts index fce6794278..f0226bed50 100644 --- a/src/main/window.ts +++ b/src/main/window.ts @@ -53,7 +53,7 @@ export function createWindow( x: 18, y: 18, }, - vibrancy: "sidebar", + vibrancy: "under-window", visualEffectState: "active", transparent: true, } as Electron.BrowserWindowConstructorOptions) diff --git a/src/renderer/src/components/ui/background/vibrancy.tsx b/src/renderer/src/components/ui/background/WindowUnderBlur.tsx similarity index 94% rename from src/renderer/src/components/ui/background/vibrancy.tsx rename to src/renderer/src/components/ui/background/WindowUnderBlur.tsx index 21f25c1313..0c84f08ecd 100644 --- a/src/renderer/src/components/ui/background/vibrancy.tsx +++ b/src/renderer/src/components/ui/background/WindowUnderBlur.tsx @@ -5,7 +5,7 @@ type Props = Component< React.DetailedHTMLProps, HTMLDivElement> > const MacOSVibrancy: Props = ({ className, children, ...rest }) => ( -
+
{children}
) diff --git a/src/renderer/src/components/ui/background/index.ts b/src/renderer/src/components/ui/background/index.ts index 11474f523d..9b9580b1c1 100644 --- a/src/renderer/src/components/ui/background/index.ts +++ b/src/renderer/src/components/ui/background/index.ts @@ -1 +1 @@ -export * from "./vibrancy" +export * from "./WindowUnderBlur" diff --git a/src/renderer/src/modules/settings/modules/fonts.tsx b/src/renderer/src/modules/settings/modules/fonts.tsx index 3dec671ce5..04cf40a341 100644 --- a/src/renderer/src/modules/settings/modules/fonts.tsx +++ b/src/renderer/src/modules/settings/modules/fonts.tsx @@ -99,7 +99,7 @@ export const ContentFontSelector = () => { export const UIFontSelector = () => { // filter out the fallback font - const data = useFontData().slice(1) + const data = useFontData().slice(1).filter((d) => d.value !== DEFAULT_FONT) const uiFont = useUISettingSelector((state) => state.uiFontFamily) const setCustom = usePresentCustomFontDialog("uiFontFamily") const isCustomFont = useMemo(