mirror of
https://github.com/Vencord/Vesktop.git
synced 2026-11-29 21:32:41 -08:00
fix native titlebar option on macOS (#1347)
This commit is contained in:
1 parent
1723bd2a33
commit
da2121d7dc
3 files changed
+7
-6
No files matched your search
@@ -386,9 +386,10 @@ function buildBrowserWindowOptions(): BrowserWindowConstructorOptions {
|
||||
}
|
||||
|
||||
if (process.platform === "darwin") {
|
||||
options.titleBarStyle = "hidden";
|
||||
options.trafficLightPosition = { x: 10, y: 10 };
|
||||
|
||||
if (!nativeTitleBar) {
|
||||
options.titleBarStyle = "hidden";
|
||||
options.trafficLightPosition = { x: 10, y: 10 };
|
||||
}
|
||||
if (macosVibrancyStyle) {
|
||||
options.vibrancy = macosVibrancyStyle;
|
||||
options.backgroundColor = "#00000000";
|
||||
@@ -406,7 +407,6 @@ function createMainWindow() {
|
||||
const win = (mainWin = new BrowserWindow(buildBrowserWindowOptions()));
|
||||
|
||||
win.setMenuBarVisibility(false);
|
||||
if (process.platform === "darwin" && Settings.store.nativeTitleBar) win.setWindowButtonVisibility(false);
|
||||
|
||||
win.on("close", e => {
|
||||
const useTray = !isDeckGameMode && Settings.store.minimizeToTray && Settings.store.tray;
|
||||
|
||||
@@ -38,7 +38,7 @@ const DEFAULT_POPOUT_OPTIONS: BrowserWindowConstructorOptions = {
|
||||
minWidth: MIN_POPOUT_WIDTH,
|
||||
minHeight: MIN_POPOUT_HEIGHT,
|
||||
frame: Settings.store.nativeTitleBar,
|
||||
titleBarStyle: process.platform === "darwin" ? "hidden" : undefined,
|
||||
titleBarStyle: process.platform === "darwin" && !Settings.store.nativeTitleBar ? "hidden" : undefined,
|
||||
trafficLightPosition:
|
||||
process.platform === "darwin"
|
||||
? {
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
*/
|
||||
|
||||
import { Settings } from "renderer/settings";
|
||||
import { isMac } from "renderer/utils";
|
||||
|
||||
import { addPatch } from "./shared";
|
||||
|
||||
if (!Settings.store.nativeTitleBar)
|
||||
if (!isMac && !Settings.store.nativeTitleBar)
|
||||
addPatch({
|
||||
patches: [
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user