Conversation
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.
This PR simplify the user's activity when defining custom color palettes from files.
Before this PR, a user had to specify the following parameters:
Now, users can simply define a palette specifying the following colors:
...and Sniffnet will automatically infer if the palette is dark or light, determining as a consequence the color of buttons and opacity values.
To achieve this, a struct
PaletteExtensionhas been defined; it is computed only once per theme (thanks to the use ofonce_cell) starting from a definedPalette.The struct
PaletteExtensiondoesn't only include the parameters that were removed from the user definition of the color scheme, but also two more fields that host the fonts of body text and headers text.Moreover, the style of the 8 additional themes has been updated to follow the same derivation rules of the styles defined via TOML.