mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 06:56:04 +02:00
Disable the blur effect on dialog overlays when GPU acceleration is disabled
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog v-model:open="open">
|
<Dialog v-model:open="open">
|
||||||
<DialogPortal :to="portalTo">
|
<DialogPortal :to="portalTo">
|
||||||
<RekaDialogOverlay class="fixed inset-0 bg-background/80 backdrop-blur-sm" />
|
<RekaDialogOverlay
|
||||||
|
:class="cn('fixed inset-0 bg-background/80', !disableGpuAcceleration && 'backdrop-blur-sm')" />
|
||||||
|
|
||||||
<RekaDialogContent
|
<RekaDialogContent
|
||||||
class="fixed inset-0 p-6 sm:p-10 border-0 bg-transparent shadow-none outline-none"
|
class="fixed inset-0 p-6 sm:p-10 border-0 bg-transparent shadow-none outline-none"
|
||||||
@@ -101,8 +102,10 @@
|
|||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Dialog } from '@/components/ui/dialog';
|
import { Dialog } from '@/components/ui/dialog';
|
||||||
import { acquireModalPortalLayer } from '@/lib/modalPortalLayers';
|
import { acquireModalPortalLayer } from '@/lib/modalPortalLayers';
|
||||||
|
import { cn } from '@/lib/utils';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { toast } from 'vue-sonner';
|
import { toast } from 'vue-sonner';
|
||||||
|
import { useGeneralSettingsStore } from '@/stores/settings/general';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import Noty from 'noty';
|
import Noty from 'noty';
|
||||||
@@ -112,6 +115,7 @@
|
|||||||
|
|
||||||
const galleryStore = useGalleryStore();
|
const galleryStore = useGalleryStore();
|
||||||
const { fullscreenImageDialog } = storeToRefs(galleryStore);
|
const { fullscreenImageDialog } = storeToRefs(galleryStore);
|
||||||
|
const { disableGpuAcceleration } = storeToRefs(useGeneralSettingsStore());
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const viewerEl = ref(null);
|
const viewerEl = ref(null);
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
import { DialogOverlay } from 'reka-ui';
|
import { DialogOverlay } from 'reka-ui';
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
import { reactiveOmit } from '@vueuse/core';
|
import { reactiveOmit } from '@vueuse/core';
|
||||||
|
import { storeToRefs } from 'pinia';
|
||||||
|
import { useGeneralSettingsStore } from '@/stores/settings/general';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
forceMount: { type: Boolean, required: false },
|
forceMount: { type: Boolean, required: false },
|
||||||
@@ -11,6 +13,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, 'class');
|
const delegatedProps = reactiveOmit(props, 'class');
|
||||||
|
const { disableGpuAcceleration } = storeToRefs(useGeneralSettingsStore());
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -19,7 +22,8 @@
|
|||||||
v-bind="delegatedProps"
|
v-bind="delegatedProps"
|
||||||
:class="
|
:class="
|
||||||
cn(
|
cn(
|
||||||
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/40 backdrop-blur-xs',
|
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/40',
|
||||||
|
!disableGpuAcceleration && 'backdrop-blur-xs',
|
||||||
props.class
|
props.class
|
||||||
)
|
)
|
||||||
">
|
">
|
||||||
|
|||||||
Reference in New Issue
Block a user