klayout icon indicating copy to clipboard operation
klayout copied to clipboard

Mouse Scroll>Zoom on 2nd display unusable

Open demisjohn opened this issue 1 year ago • 5 comments

It seems that the mouse-scroll zoom feature on a 2nd display sets the "speed" of the zoom so high that it is unusable. This is my guess of the root cause. It could also be something else.

In the attached video, I use mouse scroll (two-finger scrolling on Apple "Magic trackpad") on the primary built-in Retina display - operates as normal.

After dragging the window to 2nd display, 2 things go slightly awry:

  1. The zoom/pan on the design suddenly shifts - indicating some sort of recalculation of the resolution or display extents? not sure.
  2. Mouse-wheel scrolling speed becomes seemingly enormously fast, quick losing my position in the design. Currently I must avoid using two-finger scroll on the 2nd display.

"Zoom Fit" and "Zoom in/out" appear to work correctly, as do arrow key panning - so it is still usable, just not with the usual mouse control.

Video attached: KLayout v0 29 7 mouse zoom bug - IMG_4216 v3 and linked here (higher res): https://drive.google.com/file/d/10fz6f3L1blpgoQd2lUz8_ULtsgy-72Ab/view?usp=sharing

demisjohn avatar Oct 22 '24 20:10 demisjohn

I assume that KLayout would need to implement some protocol for dynamic resolution switching. First of all, as far I understand that matter, this is only available on Qt6 and second, that this is not easy to implement.

Couldn't you just leave the window on a single screen for now? KLayout is a spare time project which means time is spare.

klayoutmatthias avatar Oct 23 '24 21:10 klayoutmatthias

I'm using klayout (self compiled qt5 homebrew clang) on a M1 MacBook Sequoia with a 4k monitor. Zooming in/out with the trackpad works the same on the laptop Retina display and on the 4k monitor.

What machine/os are you using ? Which dmg did you use or did you compile klayout yourself ? If the latter: homebrew/anaconda, qt5/6, clang/gcc ?

stefanottili avatar Oct 23 '24 21:10 stefanottili

I guess the problem happens when one screen is a "high-DPI" one while the other isn't.

klayoutmatthias avatar Oct 23 '24 21:10 klayoutmatthias

Here is my display info:

1st) Built-In Laptop Color LCD: Display Type: Built-In Retina LCD Resolution: 2560 x 1600 Retina Framebuffer Depth: 24-Bit Color (ARGB8888)

Chipset Model: Intel Iris Plus Graphics 650 Type: GPU Bus: Built-In VRAM (Dynamic, Max): 1536 MB Vendor: Intel Device ID: 0x5927 Revision ID: 0x0006 Metal Family: Supported, Metal GPUFamily macOS 2

2nd) Acer XZ320Q P

Resolution: 1920 x 1080 (1080p FHD - Full High Definition) UI Looks like: 1920 x 1080 @ 60.00Hz Framebuffer Depth: 30-Bit Color (ARGB2101010) Display Serial Number: 130107C403W01 Main Display: Yes Mirror: Off Online: Yes Rotation: Supported Adapter Type: Belkin AVC008 Hub: USB-C--> HMDI


Klayout binary used: MacOS 14 "native" version, this one: ST-klayout-0.29.7-macOS-Sonoma-1-qt5MP-RsysPsys.dmg (Sonoma (14.1))

2017 Macbook Pro, running MacOS 14 (whatever the most recent rev is)

demisjohn avatar Oct 27 '24 03:10 demisjohn

Some other observations -

  1. When you open the CAD file, scroll speed is always ok, no matter which display. Just put the Klayout window on the correct display before opening the file.

  2. When Opening file on Low-res display (Acer 1080 above), then moving to high-res display (Retina 1600 above),

  • The scale bar is still present
  • scrolling changes scale bar to 10e+53 type of values (ie scrolling extremely fast?)
  1. reversed: When opening CAD on high-res display (Retina 1600) and draggig to Low-res (Acer 1080),
  • Scale bar is missing
  • mouse-scroll is still usuaable (original video posted above)

I would have expected scroll to get "too slow" if I reversed the direction (high-->low res or vice versa).

@klayoutmatthias since this is open source, are there no other contributors who can attempt a fix? Hopefully the entire project doesn't hinge solely on your free time! (Although it is certainly impressive what you have accomplished so far!)

@stefanottili I forgot to answer your model question: MacBook Pro, 13-inch, 2017, Four Thunderbolt 3 Ports; Macbook specs

Workaround

Open the file only after putting the Window on the correct monitor 1st. Then no issues.

demisjohn avatar Oct 30 '24 20:10 demisjohn