Skip to content

Commit

Permalink
feat: Add option to disable smooth scrolling (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZirixCZ committed Nov 24, 2023
1 parent 49e0411 commit 96b0652
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ if (IS_DEV) {
process.env.VENCORD_USER_DATA_DIR = DATA_DIR;

function init() {
const { disableSmoothScroll } = Settings.store;

if (disableSmoothScroll) {
app.commandLine.appendSwitch("disable-smooth-scrolling");
}

// work around chrome 66 disabling autoplay by default
app.commandLine.appendSwitch("autoplay-policy", "no-user-gesture-required");

Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default function SettingsUi() {
],
["staticTitle", "Static Title", 'Makes the window title "Vesktop" instead of changing to the current page'],
["enableMenu", "Enable Menu Bar", "Enables the application menu bar. Press ALT to toggle visibility."],
["disableSmoothScroll", "Disable smooth scrolling", "Disables smooth scrolling in Vesktop", false],
["splashTheming", "Splash theming", "Adapt the splash window colors to your custom theme", false],
[
"openLinksWithElectron",
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 @@ -15,6 +15,7 @@ export interface Settings {
openLinksWithElectron?: boolean;
staticTitle?: boolean;
enableMenu?: boolean;
disableSmoothScroll?: boolean;
arRPC?: boolean;
appBadge?: boolean;
discordWindowsTitleBar?: boolean;
Expand Down

0 comments on commit 96b0652

Please sign in to comment.