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

Change way themes are added #1981

Closed
thomasp85 opened this issue Jan 3, 2017 · 2 comments
Closed

Change way themes are added #1981

thomasp85 opened this issue Jan 3, 2017 · 2 comments

Comments

@thomasp85
Copy link
Member

@thomasp85 thomasp85 commented Jan 3, 2017

I've created a textboxGrob that allows for automatic wrapping of text etc. I'm trying to create an element_textbox as a subclass of element_text to allow people to use it for titles etc, but there are some problems in how themes are added that makes it impossible to subclass elements.

Specifically the class of the added elements are dropped if the element is already present, since add_theme is merely modifying the slots of the original element rather than using the added element as the base.

Will you be willing to consider a PR that flipped this behaviour so that add_theme would use the added element as base and modify the NULL slots of this?

@baptiste
Copy link
Contributor

@baptiste baptiste commented Jan 4, 2017

sounds similar to #1240

@hadley
Copy link
Member

@hadley hadley commented Jan 24, 2017

Yes, I would be willing to consider a PR.

@thomasp85 thomasp85 self-assigned this Feb 28, 2017
@karawoo karawoo closed this in #2063 Jul 3, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants