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

Use config settings screen_* in physical (unscaled) pixels #3077

Merged
merged 1 commit into from Mar 4, 2023

Conversation

10110111
Copy link
Contributor

Description

This makes the config settings screen_{w,h,x,y} work as defined in units of real pixels—the only sensible user-visible units for any screen. Previously, due to the Qt approach to GUI scaling, these settings were stored and read in units of virtual pixels.

I hope this change will relieve the debates about PR #3071.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • This change requires a documentation update

How Has This Been Tested?

Test Configuration:

  • Operating system: Ubuntu 20.04
  • Graphics Card: Intel UHD Graphics 620

Checklist:

  • My code follows the code style of this project.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (header file)
  • I have updated the respective chapter in the Stellarium User Guide
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@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.

@alex-w alex-w added this to the 23.1 milestone Feb 28, 2023
Copy link
Member

@alex-w alex-w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alex-w
Copy link
Member

alex-w commented Mar 2, 2023

Tested on macOS - everything OK

@gzotti
Copy link
Member

gzotti commented Mar 4, 2023

This again scales the custom-sized screenshots.
stellarium-065

Is this thought as precondition for #3071?

@10110111
Copy link
Contributor Author

10110111 commented Mar 4, 2023

Is this thought as precondition for #3071?

Yes, this doesn't affect screenshot sizes.

@gzotti
Copy link
Member

gzotti commented Mar 4, 2023

It actually does. Screenshot from Fullscreen has screen pixel count, from windowed mode has configured pixel count from config.ini, but custom-size screenshot deviates from configured size. If this is fixed in #3071, we can continue discussion there after merge of this.

@10110111
Copy link
Contributor Author

10110111 commented Mar 4, 2023

This commit only affects the correspondence between config.ini and window size. Custom-sized screenshots remain at status quo, i.e. broken. This is fixed in #3071.

@gzotti gzotti merged commit f74171a into Stellarium:master Mar 4, 2023
@10110111 10110111 deleted the window-size-config branch March 5, 2023 12:27
@alex-w alex-w added the state: implemented The enhancement or feature has been implemented label Mar 12, 2023
@github-actions
Copy link

Hello @10110111!

The enhancement or feature has been merged into source code and you may test it via building Stellarium from source code or wait the weekly development snapshot...

@alex-w alex-w added the state: fixed The bug has been fixed label Mar 12, 2023
@github-actions
Copy link

Hello @10110111!

The fix has been merged into source code and you may test it via building Stellarium from source code or wait the weekly development snapshot...

@alex-w alex-w added state: published The fix has been published for testing in weekly binary package and removed state: fixed The bug has been fixed state: implemented The enhancement or feature has been implemented labels Mar 13, 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 Mar 27, 2023
@github-actions
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants