diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts index 8fdb6ee..983d8ea 100644 --- a/src/main/mainWindow.ts +++ b/src/main/mainWindow.ts @@ -389,7 +389,8 @@ function createMainWindow() { contextIsolation: true, devTools: true, preload: join(__dirname, "preload.js"), - spellcheck: true + spellcheck: true, + ...(Settings.store.middleClickScroll && {enableBlinkFeatures: 'MiddleClickAutoscroll'}) }, icon: ICON_PATH, frame: !noFrame, @@ -406,6 +407,8 @@ function createMainWindow() { })); win.setMenuBarVisibility(false); + if(Settings.store.middleClickScroll) + win.on("close", e => { const useTray = !isDeckGameMode && Settings.store.minimizeToTray !== false && Settings.store.tray !== false; if (isQuitting || (process.platform !== "darwin" && !useTray)) return; diff --git a/src/renderer/components/Settings.tsx b/src/renderer/components/Settings.tsx index e0dcd55..19e5169 100644 --- a/src/renderer/components/Settings.tsx +++ b/src/renderer/components/Settings.tsx @@ -34,6 +34,7 @@ export default function SettingsUi() { true, () => Settings.tray ?? true ], + !isMac && ["middleClickScroll", "Middle Click Scroll", "Middle clicking scrolls instead of pastes", false], ["arRPC", "Rich Presence", "Enables Rich Presence via arRPC", false], [ "disableMinSize", diff --git a/src/shared/settings.d.ts b/src/shared/settings.d.ts index 5b5fd4c..5085135 100644 --- a/src/shared/settings.d.ts +++ b/src/shared/settings.d.ts @@ -12,6 +12,7 @@ export interface Settings { transparencyOption?: "none" | "mica" | "tabbed" | "acrylic"; tray?: boolean; minimizeToTray?: boolean; + middleClickScroll?: boolean; openLinksWithElectron?: boolean; staticTitle?: boolean; enableMenu?: boolean;