Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for blurry background when opening a new application #2147

Merged
merged 2 commits into from
Feb 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion dash.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ import {
Utils,
} from './imports.js';

const {DASH_ANIMATION_TIME} = Dash;
// module "Dash" does not export DASH_ANIMATION_TIME
// so we just define it like it is defined in Dash;
// taken from https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/dash.js
const DASH_ANIMATION_TIME = 200;
const DASH_VISIBILITY_TIMEOUT = 3;

const Labels = Object.freeze({
Expand All @@ -54,6 +57,30 @@ class DockDashItemContainer extends Dash.DashItemContainer {
showLabel() {
return AppIcons.itemShowLabel.call(this);
}

// we override the method show taken from:
// https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/dash.js
// in order to apply a little modification at the end of the animation
// which makes sure that the icon background is not blurry
show(animate) {
if (this.child == null)
return;

let time = animate ? DASH_ANIMATION_TIME : 0;
this.ease({
scale_x: 1,
scale_y: 1,
opacity: 255,
duration: time,
sniirful marked this conversation as resolved.
Show resolved Hide resolved
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => {
// when the animation is ended, we simulate
// a hover to gain back focus and unblur the
// background
this.set_hover(true);
},
});
}
});

const DockDashIconsVerticalLayout = GObject.registerClass(
Expand Down