Skip to content

Book: Chapter 7: Code example for setting switch state doesn't produce same output #2038

@BrickSigma

Description

@BrickSigma

Bug description
Chapter 7: Settings
In the code sample for loading and saving states in gschema settings for a switch button, the sample sets the state property for the switch using is_switch_enabled setting from the schema, however this will only change the switch background accent color but not it's position, as shown bellow:

Image

Image

I believe the example should instead set the active property rather than the state one, so that the switch color and position is correct and matches the GIF of the example shown in the book.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions