diff --git a/src/components/ha-sidebar.ts b/src/components/ha-sidebar.ts index bad87cdb23..8a5fbf0c48 100644 --- a/src/components/ha-sidebar.ts +++ b/src/components/ha-sidebar.ts @@ -187,11 +187,10 @@ class HaSidebar extends LitElement { href="#external-app-configuration" tabindex="-1" @click=${this._handleExternalAppConfiguration} + @mouseenter=${this._itemMouseEnter} + @mouseleave=${this._itemMouseLeave} > - + - - - ${!this.expanded && notificationCount > 0 - ? html` - - ${notificationCount} - - ` - : ""} - - ${hass.localize("ui.notification_drawer.title")} - - ${this.expanded && notificationCount > 0 - ? html` - ${notificationCount} - ` - : ""} - + + + ${!this.expanded && notificationCount > 0 + ? html` + + ${notificationCount} + + ` + : ""} + + ${hass.localize("ui.notification_drawer.title")} + + ${this.expanded && notificationCount > 0 + ? html` + ${notificationCount} + ` + : ""} + + - + @@ -389,14 +391,14 @@ class HaSidebar extends LitElement { } const tooltip = this._tooltip; const listbox = this.shadowRoot!.querySelector("paper-listbox")!; - let top = item.offsetTop + 7; + let top = item.offsetTop + 11; if (listbox.contains(item)) { top -= listbox.scrollTop; } tooltip.innerHTML = item.querySelector(".item-text")!.innerHTML; tooltip.style.display = "block"; tooltip.style.top = `${top}px`; - tooltip.style.left = `${item.offsetLeft + item.clientWidth + 12}px`; + tooltip.style.left = `${item.offsetLeft + item.clientWidth + 4}px`; } private _hideTooltip() { @@ -404,7 +406,7 @@ class HaSidebar extends LitElement { if (!this._tooltipHideTimeout) { this._tooltipHideTimeout = window.setTimeout(() => { this._tooltipHideTimeout = undefined; - this._tooltip.style.display = "none"; + // this._tooltip.style.display = "none"; }, 10); } } @@ -431,11 +433,10 @@ class HaSidebar extends LitElement { href="${`/${urlPath}`}" data-panel="${urlPath}" tabindex="-1" + @mouseenter=${this._itemMouseEnter} + @mouseleave=${this._itemMouseLeave} > - + ${title} @@ -611,7 +612,9 @@ class HaSidebar extends LitElement { height: 1px; background-color: var(--divider-color); } - + .notifications-container { + display: flex; + } .notifications { cursor: pointer; }