Add window preview on hover with Aero Peek and configurable animations#2470
Add window preview on hover with Aero Peek and configurable animations#2470dmzoneill wants to merge 4 commits intomicheleg:masterfrom
Conversation
|
This is targetting the abondoned PR #574 |
|
I really hope this gets implemented. |
|
@dmzoneill I'm running your fork, there's an issue. Let's say chrome is open, i hover over it and open the chrome window, dash doesn't automatically hides, i have to go back and move mouse over somewhere else on the dock for it to happen. can you take a look? |
|
dock doesn't auto-hide after clicking a preview in hover mode. Fix requires changes to 2 files: windowPreview.js - In preview.connect('activate', () => {
Main.activateWindow(window);
const topMenu = this._getTopMenu();
if (topMenu.fromHover) {
topMenu.cancelOpen();
topMenu.cancelClose();
topMenu._boxPointer.close(BoxPointer.PopupAnimation.FADE, () => {
topMenu.actor.hide();
topMenu.isOpen = false;
if (topMenu._previewBox) {
topMenu._previewBox.destroy();
topMenu._previewBox = null;
}
topMenu.emit('menu-closed');
});
} else {
topMenu.close();
}
});appIcons.js - In this._signalsHandler.addWithLabel(PREVIEW_HOVER_LABEL, [
this._previewMenu,
'menu-closed',
() => {
if (this._hoverIsEnabled && !this._previewMenu.isOpen) {
this.emit('menu-state-changed', false);
}
},
]);Please fix on your end and then update pr please. |
|
Thanks for the feedback, I'm eager for this feature to be merged.. so i dont have to run a dev copy . Please can you describe the steps clearly. In my case: if im understanding your issue, i suspect you have a conflicting setting. Can you share the schema settings? this fix may work with your settings, may break for others. |
|
@dmzoneill I noticed a small issue with dock autohide behavior. When the mouse pointer moves away from the preview of the currently active window, the preview correctly disappears, but the dock does not autohide (even when autohide is enabled). Expected behavior Once the cursor moves from the window preview back to the window area, the dock should autohide automatically. Proposed fix This can be resolved by making a small change in windowPreview.js. Modify _endHoverSession() as follows: This explicitly triggers the dock’s leave logic once the preview hover session ends, ensuring autohide works as expected. |
|
@Shobhit043 i'm not entirely sure what version of the dock you're running. |
Thanks |
|
it'd be amazing if this got implemented |
|
I hope it gets merged! |
|
I've tested the fork on a secondary machine for a couple days, works great ! Haven't noticed any particular problems. |
|
@dmzoneill Works awesome, nice job, hope to see it merged soon. :) |
Implements hover-to-preview functionality for dash-to-dock, showing window thumbnails when hovering over application icons. Includes Windows Aero Peek style transparency effect and multiple animation options. Features: - Hover over dock icons to see window previews after 300ms delay - Click on preview thumbnails to activate windows - Aero Peek: hovering over a preview makes other windows transparent - Icon-to-icon transitions: smoothly move between dock icons - Auto-show preview when launching apps while hovering - Configurable animation styles (instant, fade, slide, scale, expand, etc.) - Configurable preview size scaling - Preview shows on hover, click still opens traditional menu Technical implementation: - New setting 'show-previews-hover' to enable/disable hover previews - New setting 'preview-animation-style' with 7 animation options - WindowPreviewMenu extended with hover mode support - Hover mode removes menu from PopupMenuManager to prevent auto-close - BoxPointer made non-reactive to allow events through to dock icons - BoxPointer.bin remains reactive for clicking on window previews - windows-changed signal triggers auto-show when apps launch - 200ms delay ensures windows are properly sized before preview - Proper timeout management for smooth hover interactions Animation styles: 0. Instant - No animation 1. Fade - Pure opacity fade 2. Slide - Slide from dock with fade 3. Scale - Zoom in with scale 4. Expand - Width/height expand (default) 5. Dissolve - Quick fade with subtle scale 6. CASCADE - Staggered item appearance User experience improvements: - 300ms hover delay prevents accidental previews - Preview stays open when moving from icon to preview - 300ms delay before closing when mouse leaves - Smooth transitions between different dock icons - Instant feedback when launching applications
Adds translations for the new window preview settings introduced in commit cb0a478. Each language now includes translations for: - "Show window previews on mouse hover" - "Preview animation style" - Animation options: Instant, Fade, Slide, Scale, Expand, Dissolve, Cascade All 28 languages updated: ar, cs, de, el, es, eu, fr, gl, hu, id, it, ja, ko, nb, nl, pl, pt, pt_BR, ru, sk, sl, sr, sr@latin, sv, tr, uk_UA, zh_CN, zh_TW
- appIcons.js: remove unnecessary braces from single-statement if (curly) - dash.js: add missing BoxPointer import (no-undef), rename shadowed variable (no-shadow) - windowPreview.js: remove unused vars (PREVIEW_MAX_WIDTH, logFileStream, HOVER_LEAVE_TIMEOUT), omit unused catch binding, fix line length, convert non-interpolated template literals to single quotes, use object shorthand for delay property, remove unnecessary braces
|
SUPER! this is the feature i'll waiting for! |
Implements hover-to-preview functionality for dash-to-dock, showing window thumbnails when hovering over application icons. Includes Windows Aero Peek style transparency effect and multiple animation options.
Features:
Technical implementation:
Animation styles:
0. Instant - No animation
User experience improvements: