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

Theme toggle button dark mode becomes invisible with colored app bar #528

Closed
mangecoeur opened this issue Feb 28, 2024 · 2 comments · Fixed by #537
Closed

Theme toggle button dark mode becomes invisible with colored app bar #528

mangecoeur opened this issue Feb 28, 2024 · 2 comments · Fixed by #537

Comments

@mangecoeur
Copy link

mangecoeur commented Feb 28, 2024

Toggling the theme button to dark mode, the button becomes invisible because it picks up the primary colour, but in case the app bar already has the primary colour it is invisible.

Screen.Recording.2024-02-28.at.17.16.39.mp4

With AppBar created as:

v.AppBar(
                color="primary",
                dark=True,
                app=True,
                clipped_left=True,
                hide_on_scroll=False,
                dense=True,
            )

And theme settings

theme.themes.light.primary = "#004568"
theme.themes.dark.primary = "#004568"
@maartenbreddels
Copy link
Contributor

Yes, we have it color=primary in dark (see https://github.com/widgetti/solara/blame/11c6094f3c47528d40f8be951c1d322e454f98ea/solara/lab/components/theming.vue#L7 ).

In this example https://solara.dev/apps/scatter we change the dark setting of the toolbar, we do:

@solara.component
def Layout(children):
    route, routes = solara.use_route()
    dark_effective = use_dark_effective()
    return solara.AppLayout(children=children, toolbar_dark=dark_effective, color=None)

But I think we should not color the switch, or have it an argument. What do you think @iisakkirotko ?

@mangecoeur
Copy link
Author

I suggest not colouring the switch because the AppBar defines the colour properties of icons it contains, like in our case we have the AppBar always in "dark" mode and this automatically makes icons within it have a light colour.

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 a pull request may close this issue.

2 participants