diff --git a/CHANGELOG.md b/CHANGELOG.md index 029c5482..4426ebe2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ ### Added - Added `disabled` prop for individual options on a `SegmentedControl` #451 by @petefine +### Fixed +- Styled the figure buttons in the "mantine_light" and "mantine_dark" Plotly figure templates. #456 by @AnnMarieW + + # 0.15.1 ### Added diff --git a/dash_mantine_components/figure_templates.py b/dash_mantine_components/figure_templates.py index 311ed802..58d4ea70 100644 --- a/dash_mantine_components/figure_templates.py +++ b/dash_mantine_components/figure_templates.py @@ -50,6 +50,9 @@ def add_figure_templates(default=None): "paper_bgcolor": "#ffffff", # mantine background color "plot_bgcolor": "#ffffff", "gridcolor": "#dee2e6", + "button_bg": colors["gray"][5], + "button_active": colors["gray"][6], + "button_text": "white" }, "dark": { "colorway": [ @@ -59,6 +62,9 @@ def add_figure_templates(default=None): "paper_bgcolor": colors["dark"][7], # mantine background color "plot_bgcolor": colors["dark"][7], "gridcolor": "#343a40", + "button_bg": colors["gray"][7], + "button_active": colors["gray"][6], + "button_text": "white" } } @@ -84,6 +90,11 @@ def make_template(name): axis.gridwidth = 0.5 axis.zerolinecolor = theme_config["gridcolor"] + # Range selector buttons settings + layout.xaxis.rangeselector.font.color = theme_config["button_text"] + layout.xaxis.rangeselector.activecolor = theme_config["button_active"] + layout.xaxis.rangeselector.bgcolor = theme_config["button_bg"] + # Geo settings layout.geo.bgcolor = theme_config["plot_bgcolor"] layout.geo.lakecolor = theme_config["plot_bgcolor"]