mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 18:13:31 +00:00
[enhancement]: support using native image aspect ratio
This commit is contained in:
parent
961d1838c0
commit
38ed083693
13 changed files with 41 additions and 9 deletions
|
|
@ -40,6 +40,7 @@ export const App = () => {
|
|||
const theme = useTheme();
|
||||
const accent = useSettingsStore((store) => store.general.accent);
|
||||
const language = useSettingsStore((store) => store.general.language);
|
||||
const nativeImageAspect = useSettingsStore((store) => store.general.nativeAspectRatio);
|
||||
const { builtIn, custom, system, type } = useSettingsStore((state) => state.font);
|
||||
const { type: playbackType } = usePlaybackSettings();
|
||||
const { bindings } = useHotkeySettings();
|
||||
|
|
@ -90,6 +91,11 @@ export const App = () => {
|
|||
root.style.setProperty('--primary-color', accent);
|
||||
}, [accent]);
|
||||
|
||||
useEffect(() => {
|
||||
const root = document.documentElement;
|
||||
root.style.setProperty('--image-fit', nativeImageAspect ? 'scale-down' : 'cover');
|
||||
}, [nativeImageAspect]);
|
||||
|
||||
const providerValue = useMemo(() => {
|
||||
return { handlePlayQueueAdd };
|
||||
}, [handlePlayQueueAdd]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue