feat: Implement MiddleClickAutoScroll setting (#171)
This commit is contained in:
parent
94819e6f16
commit
d76081458b
3 changed files with 6 additions and 1 deletions
|
@ -389,7 +389,8 @@ function createMainWindow() {
|
||||||
contextIsolation: true,
|
contextIsolation: true,
|
||||||
devTools: true,
|
devTools: true,
|
||||||
preload: join(__dirname, "preload.js"),
|
preload: join(__dirname, "preload.js"),
|
||||||
spellcheck: true
|
spellcheck: true,
|
||||||
|
...(Settings.store.middleClickScroll && {enableBlinkFeatures: 'MiddleClickAutoscroll'})
|
||||||
},
|
},
|
||||||
icon: ICON_PATH,
|
icon: ICON_PATH,
|
||||||
frame: !noFrame,
|
frame: !noFrame,
|
||||||
|
@ -406,6 +407,8 @@ function createMainWindow() {
|
||||||
}));
|
}));
|
||||||
win.setMenuBarVisibility(false);
|
win.setMenuBarVisibility(false);
|
||||||
|
|
||||||
|
if(Settings.store.middleClickScroll)
|
||||||
|
|
||||||
win.on("close", e => {
|
win.on("close", e => {
|
||||||
const useTray = !isDeckGameMode && Settings.store.minimizeToTray !== false && Settings.store.tray !== false;
|
const useTray = !isDeckGameMode && Settings.store.minimizeToTray !== false && Settings.store.tray !== false;
|
||||||
if (isQuitting || (process.platform !== "darwin" && !useTray)) return;
|
if (isQuitting || (process.platform !== "darwin" && !useTray)) return;
|
||||||
|
|
|
@ -34,6 +34,7 @@ export default function SettingsUi() {
|
||||||
true,
|
true,
|
||||||
() => Settings.tray ?? 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],
|
["arRPC", "Rich Presence", "Enables Rich Presence via arRPC", false],
|
||||||
[
|
[
|
||||||
"disableMinSize",
|
"disableMinSize",
|
||||||
|
|
1
src/shared/settings.d.ts
vendored
1
src/shared/settings.d.ts
vendored
|
@ -12,6 +12,7 @@ export interface Settings {
|
||||||
transparencyOption?: "none" | "mica" | "tabbed" | "acrylic";
|
transparencyOption?: "none" | "mica" | "tabbed" | "acrylic";
|
||||||
tray?: boolean;
|
tray?: boolean;
|
||||||
minimizeToTray?: boolean;
|
minimizeToTray?: boolean;
|
||||||
|
middleClickScroll?: boolean;
|
||||||
openLinksWithElectron?: boolean;
|
openLinksWithElectron?: boolean;
|
||||||
staticTitle?: boolean;
|
staticTitle?: boolean;
|
||||||
enableMenu?: boolean;
|
enableMenu?: boolean;
|
||||||
|
|
Reference in a new issue