-
Notifications
You must be signed in to change notification settings - Fork 227
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
[feature] Define a new dataclass with color and font attributes #255
base: dev
Are you sure you want to change the base?
Conversation
This solves the basic part of wireviz#225 - supporting options to specify - Foreground/border color and text color in addition to bgcolor - Font size is not requested in wireviz#225, but included as well
In the elements: Image, AdditionalComponent, Connector, and Cable.
Avoid the extra base part of the data structure.
Thanks for tackling the issue with more customizable looks! WireViz dark mode FTW! Please bear in mind that -as you may or may not have seen-, I am working on a major refactoring on the entire WireViz codebase in #251, so I would prefer to implement this feature on top of the freshly refactored code. The best approach to get this merged will likely look like this:
The refactoring should change little in the logic required for this PR and in the result for the user, but a lot in the actual implementation... but reworking it should be relatively straightforward. |
I started this branch in April, and tried a few approaches, but decided to wait until both #214 and #219 was merged, because I needed both of these to complete. I picked up the thread again 3 weeks ago, but got too busy with other things before I managed to create a PR. I observed a lot of activity these last weeks, including a release, but I had very limited time, and have not yet looked into all the new stuff. I decided to create this as a draft PR to let you know what I have in mind. One of the reasons it's not yet completed, is that I suggest to put in inheritance in the dataclasses, but that makes certain things more complicated:
That's also what I have thought, but in case your #251 also involves an inheritance structure of dataclasses, there might exist solutions that will benefit both these PRs.
That seems reasonable. That's also one of the reasons for me to make this a draft PR at this moment.
I look forward to have a closer look into the #251 PR when I have the time to spend. |
You're welcome to have a look anytime, but expect the unexpected (missing features, unexpected output, etc.) while the PR is in draft status ;) |
options.bgcolor_title
->options.title.bgcolor