Skip to content

Power menu widget order scrambled #700

@nikander100

Description

@nikander100

Windows version

Windows 11

Windows OS build

26200.7705 (25H2)

YASB version installed

1.8.8 x64

Describe the bug

Updated from 1.8.7 > 1.8.8
noticed switch form cerberus to pydantic in release notes commit bced970
due to that the power menu now being forced in an incorrect fixed order.

due to the change to that the power menu order is now forced to the order as set in:

class PowerMenuButtonsConfig(CustomBaseModel):
lock: list[str] | None = None
signout: list[str] | None = None
sleep: list[str] | None = None
restart: list[str]
shutdown: list[str]
cancel: list[str]
hibernate: list[str] | None = None
force_shutdown: list[str] | None = None
force_restart: list[str] | None = None

which feels counterintuitive (not being able to have a specific button at a specific place in the menu)

see image for example:

Image

commented out buttons are top screenshot.

      buttons:
        # lock: ["\uea75", "Lock"] #1
        # sleep: ["\u23fe","Sleep"] #3
        # signout: ["\udb80\udf43", "Sign out"] #2
        # shutdown: ["\uf011", "Shut Down"] #5
        # restart: ["\uead2", "Restart"] #4
        # hibernate: ["\uf28e", "Hibernate"] #7
        # cancel: ["\udb81\udf3a", "Cancel"] #6
        shutdown: ["", "Shut Down"] #4
        restart: ["", "Restart"] #3
        signout: ["\uDB80\uDF43", "Sign out"] #1
        hibernate: ["", "Hibernate"] #6
        sleep: ["⏾", "Sleep"] #2
        cancel: ["", "Cancel"] #5

Relevant log output

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions