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

Remove unused global scaling ratio #3463

Merged
merged 1 commit into from
Oct 15, 2023

Conversation

10110111
Copy link
Contributor

This notion was introduced in 2013 in c3742e3, and the corresponding setter is never called. Given the current support for HiDPI scaling via the Qt-supplied mechanism of device pixel ratio and lack of the query of the global scaling ratio in many cases where the pixel ratio is queried, I think this global scaling needlessly complicates the logic, so should be removed.

@github-actions
Copy link

Great PR! Please pay attention to the following items before merging:

Files matching src/**/*.cpp:

  • Are possibly unused includes removed?

This is an automatically generated QA checklist based on modified files.

@10110111
Copy link
Contributor Author

Another approach may be to get rid of the direct use of the device pixel ratio, replacing it with this global scaling factor, and set this factor to the device pixel ratio at the initialization. This would let us roll out a custom way of handling scaling (which I actually would like to implement, because Qt's implementation sucks with its various artifacts and other shortcomings).

@alex-w alex-w added this to the 23.4 milestone Oct 14, 2023
@gzotti
Copy link
Member

gzotti commented Oct 15, 2023

This scaling problem is super annoying. If this global scaling ratio is never used, sure, get rid of it. Else, take care to keep scaling working on all 3 systems with all current flavours (W7/10/11; X11/wayland [does it make a difference?]; whateverMacDoes; see Qt docs and how Qt5/6 evolves to accommodate OS changes), and also take care of multi-screen setups with screens at potentially different scaling ratios. I am confined to one (large) screen where 125% is recommended, so am not too much help on difficult cases. Can test (W10/W11)+WSL(U22.04) though.

@10110111
Copy link
Contributor Author

I am confined to one (large) screen where 125% is recommended, so am not too much help on difficult cases.

Does Windows support virtual splitting similar to FakeXRandR? Your help will definitely be needed, because I don't have any Windows newer than 7.

@gzotti
Copy link
Member

gzotti commented Oct 15, 2023

I know roughly about xrandr, but not about fakes. What would virtual splitting do?
I have seen on another W10 system (no more in my reach) two HDMI screens (4k plus some older sub-FullHD) with different scaling. I can currently test laptop+external large screen.

@10110111
Copy link
Contributor Author

10110111 commented Oct 15, 2023

What would virtual splitting do?

It creates fake outputs, simulating several smaller monitors covering the viewport of your single large one. So you could e.g. maximize a window, and it would only expand to, say, a third of the total screen space, and then you can do the same for other windows on other virtual monitors.

@gzotti
Copy link
Member

gzotti commented Oct 15, 2023

Windows does have something like screen splitting where you can assemble 2-6 windows in a regular split pattern. But then you can drag the borders between those regions. I sometimes test things on 2 or 3 instances connected via RemoteSync, or run one Stellarium window plus a webbrowser for RemoteControl. The screen scaling would still globally apply to the physical screen.

@10110111 10110111 merged commit ad03e2f into Stellarium:master Oct 15, 2023
12 checks passed
@10110111 10110111 deleted the remove-global-scaling-ratio branch October 15, 2023 14:49
@alex-w alex-w added the state: published The fix has been published for testing in weekly binary package label Oct 23, 2023
@github-actions
Copy link

Hello @10110111!

Please check the fresh version (development snapshot) of Stellarium:
https://github.com/Stellarium/stellarium-data/releases/tag/weekly-snapshot

@alex-w alex-w removed the state: published The fix has been published for testing in weekly binary package label Dec 23, 2023
Copy link

Hello @10110111!

Please check the latest stable version of Stellarium:
https://github.com/Stellarium/stellarium/releases/latest

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

Successfully merging this pull request may close these issues.

3 participants