-
-
Notifications
You must be signed in to change notification settings - Fork 850
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
Make fps intent settings available in the GUI #3073
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files. |
The spinboxes should only apply the values when entry field editing is finished. I.e. |
Can you make a subclass of QSpinBox that does this, or suggest what exactly has to be done? We have been using these spinboxes and various connection helpers for years. But I don't type values, just scroll the mouse wheel. |
diff --git a/src/gui/configurationDialog.ui b/src/gui/configurationDialog.ui
index 92dc02c9a6..4fc3e0d362 100644
--- a/src/gui/configurationDialog.ui
+++ b/src/gui/configurationDialog.ui
@@ -2368,6 +2368,9 @@
<property name="toolTip">
<string>Minimum intended fps between user interaction. Set very low to conserve energy or save CPU use.</string>
</property>
+ <property name="keyboardTracking">
+ <bool>false</bool>
+ </property>
<property name="minimum">
<number>1</number>
</property>
@@ -2385,6 +2388,9 @@
<property name="toolTip">
<string>Maximum allowed fps. 10000 just means "as fast as possible". </string>
</property>
+ <property name="keyboardTracking">
+ <bool>false</bool>
+ </property>
<property name="minimum">
<number>10</number>
</property> |
The min/max limiting doesn't work as expected: suppose I have min 99, max 1000, and then I set max to 50. Then I move the focus away from max spinbox, and it resets back to 1000, which is clearly not the intent of the user that was to lower the maximum. I think the better way would be one of the following: Option 1: set the max spinbox to the maximum of what the user wanted and the min spinbox, and for the min spinbox the value should be the minimum of the user's input and the max spinbox; |
I don't think our spinbox property helpers do that, and I don't want to put exceeding effort into this trivial addition. I also hope that users will find out after one failed try that they just need to change the other value first. |
Actually, your current code seems to try to follow my option 1, but for some reason it doesn't work as intended when I type in the value. Instead it simply rejects the value change. |
I can add an explicit usage hint to the SUG, although I really think it's trivial to learn how to use these two settings, or why setting an obviously forbidden value does not work. |
My point is that your logic doesn't appear to work as intended. |
Why? If I enter a value that is not appropriate, the input is ignored. If I scroll the mouse wheel, it stops at the last allowed value. |
Because |
|
Or, even more properly, it should be called "frame rate", since it's the name of this quantity, while "frames per second" is a unit. |
This is the setter function. It would also be the behaviour in a script. The GUI is another topic. If the GUI rejects a user setting because it does not make sense, this is one way to solve bad user input. Accepting input in one field and changing two fields as a consequence, it may appear to be more user friendly, but is more effort. You are cordially invited to fix that to your liking if you think it's worth the effort. |
I still don't get from the diff how this difference in behavior is achieved. Where exactly does the rejection happen? |
See the connect*Property family of functions in StelDialog. |
No, the problem appears to be totally different: I had |
I left the max value at 99 because it has 2 decimal places and won't grow. Our default is 18. In practice, 5-20 fps is useful for most users, 30fps may be meaningful for script installations, and >30fps exceeds movie framerate. Usually (unless you unlock particular driver features) the OS limits max. framerate to 60. Is there a practical application for min_fps at more than 60fps? |
Yes, of course: benchmarking on high-end machines. This is why I have it so high (and vsync off) on each machine where I develop or test Stellarium. |
What is the highest fps you have ever seen? Would 1000fps be a reasonable upper limit for both? |
I use 1000 FPS for both min and max, which is sufficient for me, and this frame rate has never been hit (while 240 FPS I have seen IIRC). If you want to reduce the number of digits, you can set the upper limits to 999. |
The screenshot has to be updated after the renaming. |
Hello @gzotti! 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... |
Hello @gzotti! 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... |
Hello @gzotti! Please check the fresh version (development snapshot) of Stellarium: |
Hello @gzotti! Please check the latest stable version of Stellarium: |
Description
I saw a discussion on CloudyNights (of course not in our forum) about users running Stellarium on their little scope PCs and RemoteDesktop, and CPU use always maxing out. One found the obvious solution to limit min_fps, which was highly acclaimed as breakthrough solution. OK, this branch makes the fps intent settings readily available also in the GUI.
Fixes # (issue)
Screenshots (if appropriate):
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: