8000 Terminal misalignment on display scaling/DPI change · Issue #576 · Eugeny/tabby · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Terminal misalignment on display scaling/DPI change #576

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

Closed
d1vanloon opened this issue Dec 18, 2018 · 7 comments
Closed

Terminal misalignment on display scaling/DPI change #576

d1vanloon opened this issue Dec 18, 2018 · 7 comments

Comments

@d1vanloon
Copy link

Version: 1.0.1
Platform: win32 10.0.17134
Plugins: clickable-links

Overview

If Terminus is running when a display change occurs, such as a remote desktop session from a device with a different display size or DPI, any open terminals may be vertically misaligned. The active prompt, if at the last line of the terminal, could be below or significantly above the lower border of the Terminus window.

Here's an example going from a high-DPI display back to a normal display. Note the gap between the bottom of the terminal and the bottom of the Terminus window:

image

Normal for comparison:

image

Here's an example going from normal display to high-DPI display. Note that the last line of the terminal is mostly below the border of the Terminus window:

image

Opening a new tab or restarting Terminus fixes the alignment issue.

Steps to reproduce:

  1. Open Terminus
  2. Press Enter to fill the terminal with prompts
  3. Change the scale of the display on which Terminus is positioned

image

  1. Note the change in vertical alignment (up if scaling decreased, down if scaling increased)
@Eugeny
Copy link
Owner
Eugeny commented Dec 18, 2018

Does slightly (+/- just a few pixels) resizing the window also fix the alignment?

@d1vanloon
Copy link
Author

No, a resize doesn't seem to affect the alignment.

terminus_resize

@Eugeny
Copy link
Owner
Eugeny commented Dec 29, 2018

@d1vanloon I've added a potential fix, could you please test the nightly build once it's there?

@d1vanloon
Copy link
Author

Thanks for following up on this.

I tested with the latest nightly build. The behavior remains as previously described with one new change. If, after the DPI change, I move the window, the proper alignment is restored after a brief delay.

Could you hook into the screen.display-metrics-changed event to react to DPI changes without needing window movement?

@Eugeny
Copy link
Owner
Eugeny commented Dec 31, 2018

I'm afraid that wouldn't be much help, because screens' DPI values do not actually get changed - it's the window that gets dragged from one DPI zone into another.

@d1vanloon
Copy link
Author

@Eugeny The scenario in which I initially noted this issue involves a logical screen DPI change.

I use the application on my work PC with standard (78 PPI) DPI displays. I often use Remote Desktop to connect to my work PC from my home PC, which has high-DPI displays (e.g. 260 PPI). This results in an apparent display DPI change to running applications, which need to re-scale. The application window never moves, but the display DPI changed.

While the fix you've applied would allow me to force the application to re-configure by moving the window, some situations, e.g. when the window is maximized, make this workaround not apparent to the user.

@Eugeny Eugeny reopened this Jan 1, 2019
@Eugeny Eugeny closed this as completed in 329d044 Feb 9, 2019
@renierdbruyn
Copy link

@Eugeny The scenario in which I initially noted this issue involves a logical screen DPI change.

I use the application on my work PC with standard (78 PPI) DPI displays. I often use Remote Desktop to connect to my work PC from my home PC, which has high-DPI displays (e.g. 260 PPI). This results in an apparent display DPI change to running applications, which need to re-scale. The application window never moves, but the display DPI changed.

While the fix you've applied would allow me to force the application to re-configure by moving the window, some situations, e.g. when the window is maximized, make this workaround not apparent to the user.

Is there a potential fix for this behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0