2024-02-18 07:49:42 -08:00
|
|
|
/*
|
|
|
|
|
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
|
|
|
|
|
* Copyright (c) 2023 Vendicated and Vencord contributors
|
2025-02-07 04:16:15 +01:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2024-02-18 07:49:42 -08:00
|
|
|
*/
|
|
|
|
|
|
2025-11-20 00:03:47 +01:00
|
|
|
import { ErrorBoundary, Heading, Paragraph } from "@vencord/types/components";
|
2024-02-18 07:49:42 -08:00
|
|
|
import { Margins } from "@vencord/types/utils";
|
2025-11-20 00:03:47 +01:00
|
|
|
import { Select } from "@vencord/types/webpack/common";
|
2024-02-18 07:49:42 -08:00
|
|
|
|
|
|
|
|
import { SettingsComponent } from "./Settings";
|
|
|
|
|
|
|
|
|
|
export const WindowsTransparencyControls: SettingsComponent = ({ settings }) => {
|
|
|
|
|
if (!VesktopNative.app.supportsWindowsTransparency()) return null;
|
|
|
|
|
|
|
|
|
|
return (
|
2025-10-16 13:57:15 +02:00
|
|
|
<ErrorBoundary noop>
|
|
|
|
|
<div>
|
2025-11-20 00:03:47 +01:00
|
|
|
<Heading>Transparency Options</Heading>
|
|
|
|
|
<Paragraph className={Margins.bottom8}>
|
2025-10-16 13:57:15 +02:00
|
|
|
Requires a full restart. You will need a theme that supports transparency for this to work.
|
2025-11-20 00:03:47 +01:00
|
|
|
</Paragraph>
|
2024-02-18 07:49:42 -08:00
|
|
|
|
2025-10-16 13:57:15 +02:00
|
|
|
<Select
|
|
|
|
|
placeholder="None"
|
|
|
|
|
options={[
|
|
|
|
|
{
|
|
|
|
|
label: "None",
|
|
|
|
|
value: "none",
|
|
|
|
|
default: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "Mica (incorporates system theme + desktop wallpaper to paint the background)",
|
|
|
|
|
value: "mica"
|
|
|
|
|
},
|
|
|
|
|
{ label: "Tabbed (variant of Mica with stronger background tinting)", value: "tabbed" },
|
|
|
|
|
{
|
|
|
|
|
label: "Acrylic (blurs the window behind Vesktop for a translucent background)",
|
|
|
|
|
value: "acrylic"
|
|
|
|
|
}
|
|
|
|
|
]}
|
|
|
|
|
closeOnSelect={true}
|
|
|
|
|
select={v => (settings.transparencyOption = v)}
|
|
|
|
|
isSelected={v => v === settings.transparencyOption}
|
|
|
|
|
serialize={s => s}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</ErrorBoundary>
|
2024-02-18 07:49:42 -08:00
|
|
|
);
|
|
|
|
|
};
|