Skip to content

ThemePicker doesn't switch theme if hdrs=Theme.blue.headers() #76

@Hopsakee

Description

@Hopsakee

My issue

For some reason the ThemePicker didn't work in my app. If I choose a different color, nothing changed.

But when I changed the default from blue to slate it worked again. When I changed the default back to blue. Not working again.

My code

Not working. Theme color selection seems to work, but the moment I move to another page in the app, the color is back to blue.

app, rt = fast_app(hdrs=(Theme.blue.headers(), SortableJS('.sortable')), default_hdrs=True, live=True)

Working as expected.

app, rt = fast_app(hdrs=(Theme.slate.headers(), SortableJS('.sortable')), default_hdrs=True, live=True)

The theme switcher function

This is my 'theme switcher function'. Copied from the documentation.

def ex_theme_switcher():
    return ThemePicker()

My setup

I'm on a Windows machine.
I use Vivaldi.
Also tried on Edge. Same behaviour.

More complex, some ordered priority?

To make it even more complex.
If I choose orange as default theme. I can switch to green but not to grey or slate.
I don't really feel like trying all the different possibilities. But it seems like there is some sort of priority order.

If I choose orange as default. I can switch to blue and back. But I can't switch to slate.
If I choose slate as default, I can (I think) choose all other colors.
If I choose blue as default, I haven't found any color I can switch to. I also can't switch to orange.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions