Skip to content

Commit

Permalink
fix: compact view menu
Browse files Browse the repository at this point in the history
Fix fan speed menu in compact view
  • Loading branch information
krystiancharubin authored Mar 10, 2022
2 parents 92b1211 + d764674 commit 5c30871
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ ha-card {
position: relative;
padding: 0px;
border-radius: 4px;
overflow: hidden;
}

.preview {
background: var(--primary-color);
cursor: pointer;
overflow: hidden;
position: relative;
text-align: center;
border-radius: 4px 4px 0 0;
}

.preview.not-available {
Expand Down Expand Up @@ -224,6 +223,7 @@ ha-icon {

.toolbar {
background: var(--lovelace-background, var(--primary-background-color));
border-radius: 0 0 4px 4px;
min-height: 30px;
display: flex;
flex-direction: row;
Expand Down Expand Up @@ -272,3 +272,9 @@ ha-icon {
color: var(--primary-color);
display: flex;
}

.icon-title {
display: inline-block;
vertical-align: middle;
padding: 0 3px;
}
5 changes: 3 additions & 2 deletions src/vacuum-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ class VacuumCard extends LitElement {
<ha-button-menu @click="${(e) => e.stopPropagation()}">
<mmp-icon-button slot="trigger">
<ha-icon icon="mdi:fan"></ha-icon>
<span>
<span class="icon-title">
${localize(`source.${source}`) || source}
</span>
</mmp-icon-button>
Expand Down Expand Up @@ -514,7 +514,8 @@ class VacuumCard extends LitElement {
${this.renderSource()}
</div>
<div class="battery">
${battery_level}% <ha-icon icon="${battery_icon}"></ha-icon>
<span class="icon-title">${battery_level}%</span>
<ha-icon icon="${battery_icon}"></ha-icon>
</div>
</div>
Expand Down

0 comments on commit 5c30871

Please sign in to comment.