mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-17 22:36:35 +00:00
Put volume slider in the middle of the button (#11788)
This commit is contained in:
parent
1dd1095d19
commit
aa988c758d
@ -1,5 +1,5 @@
|
|||||||
import "@material/mwc-menu";
|
import "@material/mwc-menu";
|
||||||
import type { Corner, Menu } from "@material/mwc-menu";
|
import type { Corner, Menu, MenuCorner } from "@material/mwc-menu";
|
||||||
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
|
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
|
||||||
import { customElement, property, query } from "lit/decorators";
|
import { customElement, property, query } from "lit/decorators";
|
||||||
|
|
||||||
@ -7,6 +7,12 @@ import { customElement, property, query } from "lit/decorators";
|
|||||||
export class HaButtonMenu extends LitElement {
|
export class HaButtonMenu extends LitElement {
|
||||||
@property() public corner: Corner = "TOP_START";
|
@property() public corner: Corner = "TOP_START";
|
||||||
|
|
||||||
|
@property() public menuCorner: MenuCorner = "START";
|
||||||
|
|
||||||
|
@property({ type: Number }) public x?: number;
|
||||||
|
|
||||||
|
@property({ type: Number }) public y?: number;
|
||||||
|
|
||||||
@property({ type: Boolean }) public multi = false;
|
@property({ type: Boolean }) public multi = false;
|
||||||
|
|
||||||
@property({ type: Boolean }) public activatable = false;
|
@property({ type: Boolean }) public activatable = false;
|
||||||
@ -32,9 +38,12 @@ export class HaButtonMenu extends LitElement {
|
|||||||
</div>
|
</div>
|
||||||
<mwc-menu
|
<mwc-menu
|
||||||
.corner=${this.corner}
|
.corner=${this.corner}
|
||||||
|
.menuCorner=${this.menuCorner}
|
||||||
.fixed=${this.fixed}
|
.fixed=${this.fixed}
|
||||||
.multi=${this.multi}
|
.multi=${this.multi}
|
||||||
.activatable=${this.activatable}
|
.activatable=${this.activatable}
|
||||||
|
.y=${this.y}
|
||||||
|
.x=${this.x}
|
||||||
>
|
>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</mwc-menu>
|
</mwc-menu>
|
||||||
|
@ -266,7 +266,7 @@ export class BarMediaPlayer extends LitElement {
|
|||||||
${
|
${
|
||||||
stateObj && supportsFeature(stateObj, SUPPORT_VOLUME_SET)
|
stateObj && supportsFeature(stateObj, SUPPORT_VOLUME_SET)
|
||||||
? html`
|
? html`
|
||||||
<ha-button-menu corner="BOTTOM_START">
|
<ha-button-menu corner="BOTTOM_START" y="0" x="76">
|
||||||
<ha-icon-button
|
<ha-icon-button
|
||||||
slot="trigger"
|
slot="trigger"
|
||||||
.path=${mdiVolumeHigh}
|
.path=${mdiVolumeHigh}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user