Visual Refresh

Co-Authored-By: sadan4 <117494111+sadan4@users.noreply.github.com>
Co-Authored-By: doyle31 <abacubabacus@gmail.com>
Co-Authored-By: iilwy <iilwy@omg.games>
Co-Authored-By: Noa <164402463+nroggendorff@users.noreply.github.com>
Co-Authored-By: rini c <rini@rinici.de>
Co-Authored-By: Cassie <37855219+codef53@users.noreply.github.com>
Co-Authored-By: jamesbt365 <moxy@mothoxi.de>
Co-Authored-By: khcrysalis <97859147+khcrysalis@users.noreply.github.com>
Co-Authored-By: nin0dev <75569739+nin0-dev@users.noreply.github.com>
This commit is contained in:
thororen1234 2025-03-31 17:36:21 -04:00
parent fce4ffaabb
commit ca4b63c386
No known key found for this signature in database
23 changed files with 283 additions and 101 deletions

View file

@ -85,6 +85,11 @@ if (!IS_VANILLA) {
options.backgroundColor = "#00000000";
}
if (settings.disableMinSize) {
options.minWidth = 0;
options.minHeight = 0;
}
const needsVibrancy = process.platform === "darwin" && settings.macosVibrancyStyle;
if (needsVibrancy) {
@ -97,6 +102,12 @@ if (!IS_VANILLA) {
process.env.DISCORD_PRELOAD = original;
super(options);
if (settings.disableMinSize) {
// Disable the Electron call entirely so that Discord can't override it
this.setMinimumSize = () => { };
}
initIpc(this);
} else super(options);
}
@ -115,16 +126,9 @@ if (!IS_VANILLA) {
BrowserWindow
};
// Patch appSettings to force enable devtools and optionally disable min size
// Patch appSettings to force enable devtools
onceDefined(global, "appSettings", s => {
s.set("DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING", true);
if (settings.disableMinSize) {
s.set("MIN_WIDTH", 0);
s.set("MIN_HEIGHT", 0);
} else {
s.set("MIN_WIDTH", 940);
s.set("MIN_HEIGHT", 500);
}
});
process.env.DATA_DIR = join(app.getPath("userData"), "..", "Equicord");