Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement MiddleClickAutoScroll setting (#171) #239

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
3 changes: 2 additions & 1 deletion src/main/mainWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ function createMainWindow() {
contextIsolation: true,
devTools: true,
preload: join(__dirname, "preload.js"),
spellcheck: true
spellcheck: true,
...(Settings.store.middleClickAutoscroll && {enableBlinkFeatures: 'MiddleClickAutoscroll'})
},
icon: ICON_PATH,
frame: !noFrame,
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/components/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Margins } from "@vencord/types/utils";
import { Button, Forms, Select, Switch, Text, Toasts, useState } from "@vencord/types/webpack/common";
import { setBadge } from "renderer/appBadge";
import { useSettings } from "renderer/settings";
import { isMac } from "renderer/utils";
import { isMac, isLinux } from "renderer/utils";
import { isTruthy } from "shared/utils/guards";

export default function SettingsUi() {
Expand All @@ -34,6 +34,7 @@ export default function SettingsUi() {
true,
() => Settings.tray ?? true
],
!isLinux && ["middleClickAutoscroll", "Middle Click Autoscroll", "Enables middle-click scrolling (Requires a full restart)", false],
["arRPC", "Rich Presence", "Enables Rich Presence via arRPC", false],
[
"disableMinSize",
Expand Down
1 change: 1 addition & 0 deletions src/shared/settings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface Settings {
transparencyOption?: "none" | "mica" | "tabbed" | "acrylic";
tray?: boolean;
minimizeToTray?: boolean;
middleClickAutoscroll?: boolean;
openLinksWithElectron?: boolean;
staticTitle?: boolean;
enableMenu?: boolean;
Expand Down