fix(desktop): SVG previews now fill container properly

- Use preserveAspectRatio='xMinYMin slice' so SVG covers the frame
- Position SVG with inset-0 instead of bottom-0 right-0
- Applies to both ThemePreviewSvg and SystemPreferencePreviewSvg
This commit is contained in:
klopez4212
2026-07-06 13:41:07 +01:00
parent 8ceb1a8270
commit 8388001849

View File

@@ -47,8 +47,9 @@ function ThemePreviewSvg({ vars }: { vars: ThemePreviewVars | null }) {
return (
<svg
aria-hidden="true"
className="h-full w-full shrink-0 drop-shadow-sm"
className="h-full w-full shrink-0"
fill="none"
preserveAspectRatio="xMinYMin slice"
viewBox="0 0 118 80"
xmlns="http://www.w3.org/2000/svg"
>
@@ -228,6 +229,7 @@ function SystemPreferencePreviewSvg({
aria-hidden="true"
className="h-full w-full"
fill="none"
preserveAspectRatio="xMinYMin slice"
viewBox="0 0 118 80"
xmlns="http://www.w3.org/2000/svg"
>
@@ -473,7 +475,7 @@ export function ThemePreviewFrame({
borderColor: hsl(vars, "--border"),
}}
>
<div className="absolute bottom-0 right-0">
<div className="absolute inset-0">
<ThemePreviewSvg vars={vars} />
</div>
</div>