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

Introduce a ToggleButtons button_color style attribute #1719

Closed
simaoh opened this issue Sep 18, 2017 · 3 comments
Closed

Introduce a ToggleButtons button_color style attribute #1719

simaoh opened this issue Sep 18, 2017 · 3 comments
Labels
good first issue resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Milestone

Comments

@simaoh
Copy link

simaoh commented Sep 18, 2017

Can we change color and font of the buttons in ToggleButtons?
Should this be added to the ToggleButtonsStyle class in ipywidgets/widgets/widget_selection.py? (as in #1189) Something like this:

from .widget_core import CoreWidget
from .widget_style import Style
from .trait_types import InstanceDict, Color

class ToggleButtonsStyle(Style, CoreWidget):
     """Button style widget."""
     _model_name = Unicode('ToggleButtonsStyleModel').tag(sync=True)
     button_width = Unicode(help="The width of each button.").tag(sync=True)
     button_color = Color('#060482', allow_none=True, help="Color of the button").tag(sync=True)
     font_weight = Unicode(help="Button text font weight.").tag(sync=True)
@pbugnion
Copy link
Member

pbugnion commented Sep 20, 2017

Sounds like a good idea to me!

Are you interested in implementing this? A good place to start is looking at the ButtonStyle implementation and the base style implementation in the JS code.

@Doodledun
Copy link

@pbugnion I am at PyconCa Sprint, I am very interested in this issue. I am going to try to work on this one. Thanks for the tips!

Doodledun pushed a commit to Doodledun/ipywidgets that referenced this issue Nov 21, 2017
Doodledun pushed a commit to Doodledun/ipywidgets that referenced this issue Nov 21, 2017
Doodledun pushed a commit to Doodledun/ipywidgets that referenced this issue Nov 22, 2017
@jasongrout
Copy link
Member

FIxed by #1834. Thanks again!

@jasongrout jasongrout modified the milestones: Future, 7.x Nov 22, 2017
@jasongrout jasongrout modified the milestones: 7.x, 7.1 Dec 18, 2017
@github-actions github-actions bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Feb 9, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

No branches or pull requests

5 participants