-
-
Notifications
You must be signed in to change notification settings - Fork 815
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
Fix: bottom bar fontsize adaptations #3125
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. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
I had to change quite a bit in the bottom bar to allow even larger fonts. Also, the rescaling has to be called twice to catch all boundingbox updates. Now you can try mousewheeling the font setting in the config dialog and should hopefully always see text&buttons well arranged. What I don't know is why bounding boxes returned previously were 1 pixel narrower than the actual tested&combined geometries. I also changed this. I left a few dev parts commented out. These I will clean up before an eventual merge. |
Another problem is that, when frame rate becomes an integer, like 29 FPS instead of 29.3 FPS, the FOV field jumps a bit to the right. This used to look nicer when the fields had fixed positions. Maybe the positions should be calculated not from the current text, but from the expected widest possible contents (e.g. |
Ah yes, this used to be like that before, just with too narrow field width. The jumping is indeed bad. |
At least 2 digits after comma need for decimal FOV. Important note: the format of FOV may be changed via |
The jumps are still present, though they are a bit smaller. |
May depend on your font settings. Can you please experiment: StelGuiItems.cpp, LL 1070-72. |
OK, my experiments say that "3" is wider than "1", so when I have 34.2 FPS real-life value, it appears wider than the 12.3 placeholder, so this dominates the |
Ah yes, the 12.3 in the placeholder 'loses' against your 34.2. Will switch to 'M's (and yes, those are meant as m-dash...) |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@alex-w Do you know why the boundingrects for some GUI items are set on purpose to be 1 pixel smaller than their childrenRects? See e.g. |
Sorry, no. But maybe @xalioth can explains why… |
2333f33
to
afb4242
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Adjust vertical placement of helpLabel by font size
- overall text width can now exceed buttons area - Needs fixing the perimeter line - vertical text placement not fixed yet
- Harmonize variable names
- keep buttons visible - add a fixed gap - simplifications - docfixes
- also simplified/modernized string creation - also fixed recreation of text pixmaps for StelGuiItems when font size changes
- use override, nullptr
afb4242
to
4c5b77f
Compare
Hello @gzotti! Please check the fresh version (development snapshot) of Stellarium: |
Hello @gzotti! Please check the latest stable version of Stellarium: |
This should fix a few issues which have become more apparent around the now default-visible font selection and font size switches. A preliminary fix was attempted in #3014.
GUI help text did not follow font and font size changes.
A non-default font and font size may lead to a visible (1-pixel) peek of the sliding buttons. The bottom bar must be properly reconstructed whenever font/size change.
A few other little quirks as I find them.
Description
Fixes #3014 (issue)
Screenshots (if appropriate):
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: