microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.43k stars 29.34k forks source link

Zooming/increase editor font size with ctrl+wheel now makes the font wider/narrower without increasing vertically on certain increments #225364

Open lionel-rowe opened 3 months ago

lionel-rowe commented 3 months ago

Previously, scrolling with the wheel gave expected behavior (font gets visibly wider and taller on every increment and narrower and shorter on every decrement).

Now, sometimes it only changes in the X dimension, not the Y dimension. The effect is really janky and not desirable (I want my font to remain more-or-less the same aspect ratio regardless of size). Demo:

scroll-jank

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. Enable setting editor.mouseWheelZoom
  2. Place mouse cursor in editor pane
  3. Zoom in/out with Ctrl+mouse wheel

Increasing manually with editor.action.fontZoomIn and editor.action.fontZoomOut continues to work as expected, i.e. doesn't suffer from this problem.

Changing editor.mouseWheelScrollSensitivity seems to do nothing (neither fixes the problem nor has any noticeable effect at all).

Not sure if relevant, but my mouse is a Logitech MX Master 3S, which has two mouse wheel modes, "free spin" and "ratchet". Both modes are affected by the problem though.

eldarshamukhamedov commented 2 months ago

@alexdima any updates on this? Remember a similar issue came up in a much older build like 1-2 years ago and was fixed as a bug.

lionel-rowe commented 2 months ago

Seems fixed for me as of

Version: 1.93.0 (user setup)
Commit: 4849ca9bdf9666755eb463db297b69e5385090e3
Date: 2024-09-04T13:02:38.431Z
Electron: 30.4.0
ElectronBuildId: 10073054
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22631

Anyone else still having this problem? If not can close this issue.

Edit: This was premature, see below.

eldarshamukhamedov commented 2 months ago

@lionel-rowe still seeing issue on 1.93.0:

Version: 1.93.0 (Universal)
Commit: 4849ca9bdf9666755eb463db297b69e5385090e3
Date: 2024-09-04T13:02:38.431Z (5 days ago)
Electron: 30.4.0
ElectronBuildId: 10073054
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Darwin arm64 23.6.0
lionel-rowe commented 2 months ago

@lionel-rowe still seeing issue on 1.93.0

@eldarshamukhamedov yep, it's come back for me too. Looks like one of those sneaky issues that only sometimes occurs. One thing that's probably relevant — I use a dual-screen setup, and right now it's only affecting VS Code when the window is on my main monitor, not my laptop screen.

Edit: Also it only occurs at certain zoom levels, namely one level above the default (120%? 125%? not sure as there doesn't seem to be any way of seeing what the current zoom level is, only setting it via View: Reset Zoom etc).