Live change of theme from Preferences dropdown #1296
Merged
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.
Motivation
The theme must be updated immediately if the user selects it from the Preferences drop-down menu. In this way it's possible to preview the appearance of the various themes available.
By pressing the Cancel button the initial theme must be restored.
Change description
Restore the previous theme when the dialog is closed by pressing the Cancel button.
Other information
This is an ad hoc solution for themes, in the long run this behavior should be generalized because other elements of the Preferences, such as the Editor font size or the Interface scale, may also require a live update to give immediate feedback to the user. In this case maybe a big rework of settings is needed.
Closes #1048.
Reviewer checklist