This makes buttons with short texts such as "OK" or "Close"
easier to click, especially on a touchscreen.
This is exposed to projects via `buttons_min_width` and `buttons_min_height`
theme items in AcceptDialog (and therefore ConfirmationDialog and FileDialog),
with the default values being 0 to preserve compatibility with existing projects.
Defined more theme variations and styleboxes for those variations to work around an issue where external editor themes would apply incorrect margins to certain buttons. This should eliminate clipping/alignment issues while a custom theme is in use.
Also simplified the step where margins are copied over thanks to @Rindbee 's suggestion
This change adds a new editor setting related to theming
which controls base and additional spacing used in the
generated editor theme. These values can also be changed
manually by the user to customize their experience.
Limited effort was applied to make sure both Compact and
Spacious presets work and look fine, but further tuning
and adjustments are totally expected. Some controls will
require layout changes or additional fixes to their constants.
This change introduces a new theme configuration struct to be
passed to the aforementioned routines to better control reuse
of styles and definitions in the generator.
Everything not passed and not explicitly shared is scoped so it
is not automatically accessible throughout the routine. This
should ensure that the decision to share styles is a conscious one.
In the future we will try to reduce the number of unique definitions
and share most of it. This PR is a stepping stone on this path.
This also puts the effort into separating redefinitions of
default theme items vs custom types introduced only by the editor.
In a few cases where editor-specific definitions need to reference
default definitions we simply fetch them from the theme. It's not
ideal and hides the dependency a bit, but hopefully these cases
will be abstracted properly in due time.
This change introduces a new EditorThemeManager class
to abstract theme generatio and its subroutines.
Logic related to EditorTheme, EditorColorMap, and editor
icons has been extracted into their respective files with
includes cleaned up.
All related files have been moved to a separate folder to
better scope them in the project. This includes relevant
generated files as well.