Repository navigation
Feature/change font size - #667
Draft
DiggiDoggi wants to merge 22 commits into
Draft
DiggiDoggi wants to merge 22 commits into
DiggiDoggi wants to merge 22 commits into
Conversation
Next stage -> Clean some code if tests on other systems return OK
Cleaning the code from not needed (commented) stuff. As we can now disable the whole plugin, menu handler is created on demand. All major forms are now style-compatible, typically by simple call inside their OnShow().
…ggi/castle-engine into feature/change_font_size
Changed procedure name UpdateMenu to UpdateMenuStyle to make clear what the procedure does.
DiggiDoggi
marked this pull request as draft
July 3, 2025 14:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added an ability to change the font size across the CGE editor forms, with optional change to the TSplitter size, in a bid to make them more visible on high resolution displays.
It's been done the way that doesn't need much maintenance or changes to the current code.
The user preferences are stored in UserConfig, and can be completely switched off by one click on FormPreferences.
The font size can be applied to the menu / popup menu, and it can be switched off independently.
To implement the style setting on a new form it's enough if you add StyleUtils to USES clause, and OnFormShow should call either:
In that way the code requires very little to adapt to font changes.
Also the code has been made with simplicity on mind. It could be improved but I didn't want to make it a maintenance burden.
The FormPreferences has been redesigned. Git will report hundreds of changes, but in fact only the 'tabs' were changed to TScrollBox from old TPanel, as with increased font size some setting options can go out of the view.
The FormAbout has an extra code to make sure that form's size is aligned with increased size of the labels. In that way design is kept in its original style and feel. With bigger fonts, the copyright label was going outside the form. I could make it WordWrap, but it looked very bad that way.
FormProject and FrameDesign have an extra code in UpdateStyle procedure to adapt to the font changes.
The FormChooseProject has been left almost unchanged - only the popup menu to select recent projects can change font size. Change of the font size on the form would break the design, so I left it as it is.
Other changes were very minor, if any.
I have tested it on windows 11 with different font sizes, also with system-wide scale changes and different resolutions. Although font size of 18 should be OK for 8k display, I'd recommend using sizes in range of 7-13. The hard limit is 7-18.