feat: Add UI support for PTZ presets (#1920)

- Closes #1889

Whilst a simple change theoretically, the card has such a collection of
surfaces that can overlap other surfaces, it's challenging to get this
to work right! There's a real chance this will have broken something
z-index related (e.g. X overlaps Y when it should not), or (for related
reasons) broken curver corners on the card.
This commit is contained in:
Dermot Duffy
2025-02-27 20:22:12 -08:00
committed by GitHub
parent bb147a45fd
commit 0432eea4b8
37 changed files with 833 additions and 647 deletions
+1 -12
View File
@@ -1,4 +1,4 @@
@use './button.scss';
@use './menu-button.scss';
:host {
--advanced-camera-card-menu-button-size: 40px;
@@ -10,9 +10,6 @@
display: flex;
flex-direction: row;
justify-content: space-between;
// Allow submenus to overflow the menu "bar".
overflow: visible;
}
:host([data-style='outside']) {
@@ -142,13 +139,5 @@ div.opposing {
background: var(--advanced-camera-card-menu-background);
}
// Icons in the menu are expected to follow Advanced Camera Card theming unless they are
// active (in which case we want to take advantage of the whatever styling is
// appropriate, e.g. light icon partially lit).
:host ha-icon-button {
--state-unavailable-color: var(--advanced-camera-card-button-color);
--state-inactive-color: var(--advanced-camera-card-button-color);
}
// Further theme related styling is dynamically applied by `menu.ts`, see
// `_renderPerInstanceStyle`.