Remove ThemeSettings
In Pharo there are two ways to configure themes.
The first is to use ThemeSettings class that allows any theme to have part of them configurable. But this does not cover everything.
The second is to subclass a theme and override the methods we want to change.
Boths have pro and cons. For example, ThemeSettings allow to customize some colors from the settings without creating a theme. But ThemeSettings does not allow to customize everything and can cause some troubles. For example, when we change of theme, some Morphs are not updated because the setting is not changed.
The perfect solution would be to have a "configurable theme" where everything could be configurable, and the other themes would not need to use ThemeSettings but since Morphic should be removed, it seems like a waste of time.
Instead I propose to remove ThemeSettings and to have only one way to customize a theme: by creating a Theme class.
This will simblify the code, make theme a little more efficient and mostly it would fix some graphical glitches in the UI! Recently Clotilde lost some time to fix one of those glitches and we still have some.
+1!
After some analysis it seems that we have two things:
- Definition of colors
- Definition of other settings such as Fast dragging, rounded corners, icons layout (right on windows, left on unix)...
To me colors should be extracted because they should be defined by the theme. But settings such as fast dragging should stay there because they are independent of the theme
Instead of instantiating a ThemeSettings instance by theme, maybe we should have a default instance that does not change depending on the theme? If I select "Round corners" in the settings, then I want rounded corners independently to the theme selected
Also we have some variables that have no settings associated. I wonder if we should not get rid of them to simplify the code because it means that if you want to change them, you need to update the new ThemeSettings instance each time a theme is changed?