Media player visual improvements (#6817)

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
Philip Allgaier 2020-09-08 23:36:44 +02:00 committed by GitHub
parent 0e021e7d7d
commit 7c5a78a1cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 13 deletions

View File

@ -335,6 +335,7 @@ export class HaMediaPlayerBrowse extends LitElement {
.item=${child}
graphic="avatar"
hasMeta
dir=${computeRTLDirection(this.hass)}
>
<div
class="graphic"
@ -360,7 +361,7 @@ export class HaMediaPlayerBrowse extends LitElement {
></ha-svg-icon>
</mwc-icon-button>
</div>
<span>${child.title}</span>
<span class="title">${child.title}</span>
</mwc-list-item>
<li divider role="separator"></li>
`
@ -620,6 +621,7 @@ export class HaMediaPlayerBrowse extends LitElement {
mwc-list {
--mdc-list-vertical-padding: 0;
--mdc-list-item-graphic-margin: 0;
--mdc-theme-text-icon-on-background: var(--secondary-text-color);
margin-top: 10px;
}
@ -728,6 +730,14 @@ export class HaMediaPlayerBrowse extends LitElement {
background-color: transparent;
}
mwc-list-item .title {
margin-left: 16px;
}
mwc-list-item[dir="rtl"] .title {
margin-right: 16px;
margin-left: 0;
}
/* ============= Narrow ============= */
:host([narrow]) {

View File

@ -64,14 +64,12 @@ class PanelMediaBrowser extends LitElement {
"ui.components.media-browser.media-player-browser"
)}
</div>
<mwc-icon-button
.label=${this.hass.localize(
"ui.components.media-browser.choose-player"
)}
@click=${this._showSelectMediaPlayerDialog}
>
<ha-svg-icon .path=${mdiPlayNetwork}></ha-svg-icon>
</mwc-icon-button>
<mwc-button @click=${this._showSelectMediaPlayerDialog}>
<ha-svg-icon .path=${mdiPlayNetwork}></ha-svg-icon>
${this.hass.localize(
"ui.components.media-browser.choose_player"
)}
</mwc-button>
</app-toolbar>
</app-header>
<div class="content">

View File

@ -40,8 +40,6 @@ export class HuiDialogSelectMediaPlayer extends LitElement {
return html`
<ha-dialog
open
scrimClickAction
escapeKeyAction
hideActions
.heading=${createCloseHeading(
this.hass,

View File

@ -40,8 +40,6 @@ export class HuiDialogWebBrowserPlayMedia extends LitElement {
return html`
<ha-dialog
open
scrimClickAction
escapeKeyAction
hideActions
.heading=${createCloseHeading(
this.hass,