Skip to content
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

Color scheme configuration #20

Merged
merged 17 commits into from
Sep 24, 2021
Merged

Conversation

AndreLaranjeira
Copy link
Owner

@AndreLaranjeira AndreLaranjeira commented Sep 22, 2021

  • Users can now set, get and reset the colors used by the logger in messages and message tags;
  • Created structs to hold the logger's color information and macros with default color values;
  • Minor refactoring and changes to existing code;
  • Updated README.md;

Closes #11.

* Fixed a bug where color background was not reset properly;
* Fixed a bug where font intensity was not reset properly;
* Changed internal commands to color background and text;
* User may now get and set text and background colors used by the 
message logger for different message types and tags;
* Added a default color (DFLT) to the Colors enum;
* Refactored some color resetting internal functions and implementations 
(without breaking backward compatability);
* Minor changes to variable names, comments and code structures;
* Setter functions for logger colors now receive a pointer for the 
display colors. This avoids unnecessary struct duplication. Due to this, 
added changes necessary for pointer handling in setter functions;
* Added thread-safety checks to setter functions;
* Changed an error message to match other messages of the same kind;
* Changed a color used in an example to improve aesthetics;
* User may now get and set text and background colors used by the 
message logger for different message types and tags;
* Added a default color (DFLT) to the Colors enum;
* Refactored some color resetting internal functions and implementations 
(without breaking backward compatability);
* Minor changes to variable names, comments and code structures;
* Setter functions for logger colors now receive a pointer for the 
display colors. This avoids unnecessary struct duplication. Due to this, 
added changes necessary for pointer handling in setter functions;
* Added thread-safety checks to setter functions;
* Changed an error message to match other messages of the same kind;
* Changed a color used in an example to improve aesthetics;
* Created macros to house the default message and tag colors for the 
logger. This allows reusability by my module and the user;
* Changed the logger color pallet to be a static variable;
* Added functionality to reset the logger colors, with an example in the 
sample;
* Added the const modifier to the origin DisplayColors in the 
copy_display_colors function;
* Updated README.md to reflect this new feature;
* Because this function is always called before a tag or message being 
printed inside a locked component, there is no reason to reset the 
colors only to them assign different colors to the output.
@AndreLaranjeira AndreLaranjeira merged commit 7518d5c into development Sep 24, 2021
@AndreLaranjeira AndreLaranjeira deleted the 011_color_scheme_config branch September 24, 2021 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant