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

UI Error when moving window to a screen with different resolution. #1282

Open
varunchitturi opened this issue Dec 28, 2022 · 10 comments · May be fixed by #1650
Open

UI Error when moving window to a screen with different resolution. #1282

varunchitturi opened this issue Dec 28, 2022 · 10 comments · May be fixed by #1650
Assignees
Labels
bug Something isn't working mac rendering scaling

Comments

@varunchitturi
Copy link

When using opening the application on my MacBook, the UI looks fine:
Lite XL Lite XL - 2022-12-28 at 09 18 12@2x
However, when dragging the window to a lower resolution monitor connect to my MacBook, the UI gets distorted like so:

Lite XL Lite XL - 2022-12-28 at 09 18 55

@Guldoman Guldoman added bug Something isn't working rendering scaling labels Dec 28, 2022
@jgmdev
Copy link
Member

jgmdev commented Dec 29, 2022

Can you try one of the testing builds on this repo: https://github.com/jgmdev/lite-xl/releases/tag/v2.1.0 which include the changes on this PR #998 to better handle scaling, and report if it worked better for you?

@varunchitturi
Copy link
Author

When opening the application on my MacBook that is connected to monitors, the window opens with a very large scale font:
Lite XL Lite XL - 2022-12-30 at 19 24 27@2x
When moving the window to my secondary monitor, the font looks very squished:
Lite XL Lite XL - 2022-12-30 at 19 25 03
When moving, the window back to my MacBook from the secondary monitor, the font gets fixed:

Lite XL Lite XL - 2022-12-30 at 19 25 48@2x

Note: Tested build from https://github.com/jgmdev/lite-xl/releases/tag/v2.1.0

@kerryj89
Copy link

kerryj89 commented Oct 22, 2023

I am also seeing the same issue. I use my external monitor and the scale is fine, but when I drag it to my M1 the font shrinks like the last image posted here. The official release had this issue and jgmdev's fork is also having the scaling issue.

I wonder if it's a HiDPI/LoDPI issue. On the official build I remember tweaking the scale to look nice on my MacBook Pro (HiDPI retina), then hooking up to an external monitor and dragging Lite-XL over (HiDPI -> LoDPI) the UI and text got even larger than OP's.

Then on jgmdev's fork, I tweaked everything to look right on my external (LoDPI non-retina ) monitor and brought it over to my MacBook Pro and everythink shrunk beyond readability.

  • Macbook Pro M1 HiDPI @ 1728 x 1117
  • Ultrawide 49" monitor LoDPI @ 4864 x 1368

@Guldoman
Copy link
Member

Yeah, this can be reproduced on Linux too when using the RENDERER backend option.
This happens because it doesn't account for monitor changes, so the scale is never updated.
I have some ideas to improve the situation for scaling changes in general (not only macOS), but it'll have to wait until the next major version.

As a workaround for now you could do a quick restart when you change monitor with the command Core: Restart (ctrl+alt+r on non-macOS).
I'll see if we can get a quick fix in for the next bugfix release.

@Guldoman
Copy link
Member

Guldoman commented Oct 23, 2023

Ok I have a quick fix in the pipeline.
As a curiosity, what's the scale used by your monitors?

@Guldoman
Copy link
Member

Can anyone check if #1650 actually fixes the issue on macOS?
There should be debug builds in the CI (https://github.com/lite-xl/lite-xl/actions/workflows/build.yml -> Click on the latest with the same name as that PR -> You'll find Artifacts at the bottom of the page).

@kerryj89
Copy link

kerryj89 commented Oct 24, 2023

Can anyone check if #1650 actually fixes the issue on macOS? There should be debug builds in the CI (https://github.com/lite-xl/lite-xl/actions/workflows/build.yml -> Click on the latest with the same name as that PR -> You'll find Artifacts at the bottom of the page).

That fix worked for me!

As a curiosity, what's the scale used by your monitors?

Don't know if I'm calculating scale properly so also listed out numbers.
External = 161.29% (native 3840 x 1080, set res custom 4864 x 1368)
Mac = 100% (native 1728 x 1117, set res 1728 x 1117)

@Guldoman
Copy link
Member

That fix worked for me!

Awesome! Thanks for testing!

@kerryj89
Copy link

kerryj89 commented Oct 24, 2023

Awesome! Thanks for testing!

Slightly off-topic, but do you know why my settings aren't auto applying to this version of Lite-XL? I see the extensions installed but it seems some of the settings (disabled toolbar) and extensions (sticky header) aren't carrying over. Is this due to me previously using the addon variant and this version not? I would like to test again with all my settings applied.

@Guldoman
Copy link
Member

Is this due to me previously using the addon variant and this version not?

Yes, the addons version bundles the settings plugin which saves the changes you do with it in its own file.

I would like to test again with all my settings applied.

You could manually install the settings plugin, or use LPM to install it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mac rendering scaling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants