Skip to content

Support mute state in volume slider #100

Answered by linkfrg
seve-andre asked this question in Q&A
Discussion options

You must be logged in to vote

UPD: #103 adds bind_many(), so you can write it just like this:

Widget.Scale(
    value=audio.speaker.bind_many(
        ["volume", "is_muted"],
        lambda volume, is_muted: 0 if is_muted else volume,
    ),
)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@seve-andre
Comment options

Comment options

You must be logged in to vote
1 reply
@seve-andre
Comment options

Answer selected by linkfrg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants