-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
Improve Theme Structure #1051
Improve Theme Structure #1051
Commits on Jul 3, 2021
-
color: Add helper function to new file to add color properties.
A helper function `color_properties` was used to make it easy to add color definitions with style properties. It was added into config/color.py to avoid circular imports in `themes.py`. Tests added.
Configuration menu - View commit details
-
Copy full SHA for 028853c - Browse repository at this point
Copy the full SHA 028853cView commit details -
color: Add default color-scheme with bold, based on existing colors.
A DefaultColor class is added to color.py which acts as the default color-scheme for ZT. The BOLD property is added to these colors using the helper function color_properties. The format: * The colors have been defined using Enum's as a single string containing 16, 256 and 24 bit codes. * Each style is defined as a tuple of 2 elements, the foreground and the background. The 24 bit colors are not defined for the default colors hence default is used. 2 missing colors in DEF, DARK_MAGENTA and LIGHT_CYAN, which were used in zt_blue were added into Color.
Configuration menu - View commit details
-
Copy full SHA for d31e7ca - Browse repository at this point
Copy the full SHA d31e7caView commit details -
themes: Rename required_styles to REQUIRED_STYLES for consistency.
The `required_styles` dict is renamed to REQUIRED_STYLES to maintain similarity with STYLE dict in incoming themefiles. Tests updated.
Configuration menu - View commit details
-
Copy full SHA for 923f2eb - Browse repository at this point
Copy the full SHA 923f2ebView commit details -
THEME_CONTRIBUTING: Add documentation for creating/adapting themes.
This commit creates a Theme Contribution Guide to help with understanding the format in Themefiles and creating new themes.
Configuration menu - View commit details
-
Copy full SHA for 91af6d9 - Browse repository at this point
Copy the full SHA 91af6d9View commit details -
zt_dark: Create new zt_dark theme structure.
New zt_dark theme structure was created using a script and some manual editing. `zt_dark.py` can be found in the new themes folder.
Configuration menu - View commit details
-
Copy full SHA for 1873e0e - Browse repository at this point
Copy the full SHA 1873e0eView commit details -
zt_light: Create new zt_light theme structure.
New zt_light theme structure was created using a script and some manual editing. `zt_light.py` can be found in the themes folder.
Configuration menu - View commit details
-
Copy full SHA for 8b15e5f - Browse repository at this point
Copy the full SHA 8b15e5fView commit details -
zt_blue: Create new zt_blue theme structure.
New zt_blue theme structure was created using a script and some manual editing. `zt_blue.py` can be found in the themes folder.
Configuration menu - View commit details
-
Copy full SHA for c71c172 - Browse repository at this point
Copy the full SHA c71c172View commit details -
gruvbox: Create new gruvbox theme structure.
New gruvbox theme structure was created using a script and some manual editing. `gruvbox.py` can be found in the themes folder. The names used for the color scheme is from the official gruvbox theme.
Configuration menu - View commit details
-
Copy full SHA for d1ffd63 - Browse repository at this point
Copy the full SHA d1ffd63View commit details -
themes: Test new themefile completeness.
This commit tests completeness on new themefiles in test_themes. Checks: * STYLE and REQUIRED_STYLES use the same styles * All 3 color codes are in the correct format, using regex * color used in STYLE is defined in the Color class. Run: pytest -k test_new_builtin_theme
Configuration menu - View commit details
-
Copy full SHA for 00a1e5d - Browse repository at this point
Copy the full SHA 00a1e5dView commit details -
themes: Parse theme file to generate urwid theme.
This commit creates the function `generate_theme` in themes.py which parses a theme file to generate a urwid compatible theme depending on the color-depth used. The theme files are accessed using NEW_THEMES which is a placeholder for the THEMES dict until migration happens. A new type hint for urwid compatible styles is created - StyleSpec. Slicing lists doesn't work with very specific type hints like StyleSpec hence Any is used, though this function will shortly be removed. Tests added.
Configuration menu - View commit details
-
Copy full SHA for 91a5375 - Browse repository at this point
Copy the full SHA 91a5375View commit details -
tests: theme: Test migration to new themes.
A temporary test has been used to make sure all the color codes for all the color depths are correct and no errors have been made during the transition. Run: `pytest -k test_migrated_themes`
Configuration menu - View commit details
-
Copy full SHA for a609ec4 - Browse repository at this point
Copy the full SHA a609ec4View commit details -
theme: Delete old themes and migrate to new themefiles.
Old theme format used in themes.py is deleted from this commit. * Migrated to new themes in `run.py` * Mono theme generation is no longer required hence it is removed from both themes.py and run.py * NEW_THEMES is now the new THEMES dict. * `complete_and_incomplete_themes` is edited to make it use the new THEMES instead of the old one. A new `builtin_theme_completeness` test is added. Tests amended.
Configuration menu - View commit details
-
Copy full SHA for f1a3adf - Browse repository at this point
Copy the full SHA f1a3adfView commit details