Enhance workspace indicator styling and add animation handling in compact mode

This commit is contained in:
mr. M
2025-01-14 17:43:25 +01:00
parent 5886241e8d
commit 60553b996c
2 changed files with 13 additions and 0 deletions

View File

@@ -477,6 +477,10 @@
& #zen-current-workspace-indicator-icon {
min-height: 16px;
}
& #zen-current-workspace-indicator-icon:not([hidden]) + #zen-current-workspace-indicator-name {
padding-left: 24px;
}
}
@media not (-moz-bool-pref: 'zen.workspaces.show-workspace-indicator') {

View File

@@ -18,6 +18,7 @@ var gZenCompactModeManager = {
_flashTimeouts: {},
_evenListeners: [],
_removeHoverFrames: {},
_animatingElements: {},
init() {
Services.prefs.addObserver('zen.view.compact', this._updateEvent.bind(this));
@@ -317,9 +318,17 @@ var gZenCompactModeManager = {
target.addEventListener('mouseenter', (event) => {
this.clearFlashTimeout('has-hover' + target.id);
window.requestAnimationFrame(() => target.setAttribute('zen-has-hover', 'true'));
this._animatingElements[target.id] = true;
setTimeout(() => {
delete this._animatingElements[target.id];
}, 312.5);
});
target.addEventListener('mouseleave', (event) => {
if (this._animatingElements[target.id]) {
return;
}
// If on Mac, ignore mouseleave in the area of window buttons
if (AppConstants.platform == 'macosx') {
const MAC_WINDOW_BUTTONS_X_BORDER = 75;