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

Add overlay background #126

Merged
merged 6 commits into from
Jan 13, 2025
Merged

Add overlay background #126

merged 6 commits into from
Jan 13, 2025

Conversation

ildar170975
Copy link
Collaborator

Added a possibility a customize:
overlay background when locked / blocked;
outline for an overlay in a row when locked / blocked;
border radius for an overlay in a row

New theme variables are introduced:
restriction-overlay-background
restriction-overlay-background-blocked
restriction-overlay-row-outline
restriction-overlay-row-outline-blocked
restriction-overlay-row-border-radius

@antoniodvr
Copy link

Didn't have much time to validate it @ildar170975 but I do have the feeling that 'duration' attribute doesn't work properly with the overlay (the lock gets removed right away).

@ildar170975
Copy link
Collaborator Author

ildar170975 commented Jan 17, 2025

@antoniodvr
Thanks for testing!

Consider this code:

type: vertical-stack
cards:
  - &ref_card
    type: custom:restriction-card
    action: hold
    card:
      type: entities
      entities:
        - entity: input_boolean.test_boolean
  - <<: *ref_card
    duration: 10
  - <<: *ref_card
    duration: 2

Check with a default theme:
r1

Check with a theme provided in Readme:
r2
Note that restriction-lock-opacity: 0 - no lock is shown.

Check with same theme with restriction-lock-opacity: 0 removed:
r3

The lock icon is not removed immediately.
A duration of this transition is NOT controlled by the duration option, it is fixed (2 sec, you can customize it by card-mod).

The background changes immediately.
Probably making it changing like the icon would be a nice improvement, I will think how to do it.

@ildar170975 ildar170975 deleted the feat-overlay-background branch January 17, 2025 02:57
@ildar170975
Copy link
Collaborator Author

ildar170975 commented Jan 17, 2025

@antoniodvr
FYI: prepared a PR for "background slowly disappearing" feature: #132
Released in 1.2.13.

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 this pull request may close these issues.

2 participants