Compare commits
No commits in common. "57c41f9d49644cca9e4bee7c9229de960850b6bd" and "78eb8af5307f7abe20c76b2d365d71c91a04d4e8" have entirely different histories.
57c41f9d49
...
78eb8af530
4 changed files with 22 additions and 29 deletions
|
@ -87,10 +87,7 @@ const NotificationIcon = notif => {
|
|||
});
|
||||
};
|
||||
|
||||
export default ({
|
||||
notif,
|
||||
command = () => {},
|
||||
} = {}) => {
|
||||
export default ({ notif, command = () => {} } = {}) => {
|
||||
const BlockedApps = [
|
||||
'Spotify',
|
||||
];
|
||||
|
|
|
@ -76,12 +76,12 @@ export default ({
|
|||
|
||||
if (offset >= 0) {
|
||||
self.setStyle(`margin-left: ${Number(offset + startMargin)}px;
|
||||
margin-right: -${Number(offset + startMargin)}px;`);
|
||||
margin-right: -${Number(offset + startMargin)}px;`);
|
||||
}
|
||||
else {
|
||||
offset = Math.abs(offset);
|
||||
self.setStyle(`margin-right: ${Number(offset + startMargin)}px;
|
||||
margin-left: -${Number(offset + startMargin)}px;`);
|
||||
margin-left: -${Number(offset + startMargin)}px;`);
|
||||
}
|
||||
|
||||
self.get_parent()._dragging = Math.abs(offset) > 10;
|
||||
|
@ -93,16 +93,15 @@ export default ({
|
|||
[gesture, self => {
|
||||
if (!self._ready) {
|
||||
self.setStyle(`transition: margin 0.5s ease, opacity 0.5s ease;
|
||||
margin-left: -${Number(maxOffset + endMargin)}px;
|
||||
margin-right: ${Number(maxOffset + endMargin)}px;
|
||||
margin-bottom: 0px; margin-top: 0px; opacity: 0;`);
|
||||
margin-left: -${Number(maxOffset + endMargin)}px;
|
||||
margin-right: ${Number(maxOffset + endMargin)}px;
|
||||
margin-bottom: 0px; margin-top: 0px; opacity: 0;`);
|
||||
|
||||
Utils.timeout(500, () => {
|
||||
self.setStyle(`transition: margin 0.5s ease, opacity 0.5s ease;
|
||||
margin-left: ${startMargin}px;
|
||||
margin-right: ${startMargin}px;
|
||||
margin-bottom: unset; margin-top: unset;
|
||||
opacity: 1;`);
|
||||
margin-left: ${startMargin}px;
|
||||
margin-right: ${startMargin}px;
|
||||
margin-bottom: unset; margin-top: unset; opacity: 1;`);
|
||||
});
|
||||
Utils.timeout(1000, () => self._ready = true);
|
||||
return;
|
||||
|
@ -126,10 +125,9 @@ export default ({
|
|||
}
|
||||
else {
|
||||
self.setStyle(`transition: margin 0.5s ease, opacity 0.5s ease;
|
||||
margin-left: ${startMargin}px;
|
||||
margin-right: ${startMargin}px;
|
||||
margin-bottom: unset; margin-top: unset;
|
||||
opacity: 1;`);
|
||||
margin-left: ${startMargin}px;
|
||||
margin-right: ${startMargin}px;
|
||||
margin-bottom: unset; margin-top: unset; opacity: 1;`);
|
||||
if (widget.window)
|
||||
widget.window.set_cursor(Gdk.Cursor.new_from_name(display, 'grab'));
|
||||
|
||||
|
|
|
@ -12,15 +12,18 @@ const Popups = () => Box({
|
|||
['map', new Map()],
|
||||
|
||||
['dismiss', (box, id, force = false) => {
|
||||
if (!id || !box._map.has(id) || box._map.get(id)._hovered && !force)
|
||||
if (!id || !box._map.has(id) ||
|
||||
box._map.get(id)._hovered && !force)
|
||||
|
||||
return;
|
||||
|
||||
|
||||
if (box._map.size - 1 === 0)
|
||||
box.get_parent().reveal_child = false;
|
||||
|
||||
Utils.timeout(200, () => {
|
||||
if (box._map.get(id)?.interval) {
|
||||
GLib.source_remove(box._map.get(id).interval);
|
||||
box._map.get(id).interval.destroy();
|
||||
box._map.get(id).interval = undefined;
|
||||
}
|
||||
box._map.get(id)?.destroy();
|
||||
|
@ -50,14 +53,12 @@ const Popups = () => Box({
|
|||
});
|
||||
|
||||
box._map.get(id).interval = Utils.interval(4500, () => {
|
||||
const notif = box._map.get(id);
|
||||
if (!notif._hovered) {
|
||||
notif.child.setStyle(notif.child._leftAnim1);
|
||||
if (!box._map.get(id)._hovered) {
|
||||
box._map.get(id).child.setStyle(box._map.get(id).child._leftAnim1);
|
||||
|
||||
if (notif.interval) {
|
||||
Utils.timeout(500, () => notif.destroy());
|
||||
GLib.source_remove(notif.interval);
|
||||
notif.interval = undefined;
|
||||
if (box._map.get(id).interval) {
|
||||
GLib.source_remove(box._map.get(id).interval);
|
||||
box._map.get(id).interval = undefined;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -105,8 +105,6 @@ animations {
|
|||
enabled = yes
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
bezier = easeInOutBack, 0.68, -0.6, 0.32, 1.6
|
||||
|
||||
bezier = easeInBack, 0.36, 0, 0.66, -0.56
|
||||
bezier = easeOutBack, 0.34, 1.56, 0.64, 1
|
||||
bezier = softEaseOutBack, 0.34, 1.26, 0.64, 1
|
||||
|
@ -114,7 +112,6 @@ animations {
|
|||
animation = windows, 1, 7, myBezier
|
||||
animation = windowsIn, 1, 7, easeOutBack, slide
|
||||
animation = windowsOut, 1, 7, easeInBack, slide
|
||||
animation = windowsMove, 1, 7, easeOutBack, slide
|
||||
|
||||
animation = workspaces, 1, 6, softEaseOutBack, slide
|
||||
|
||||
|
|
Loading…
Reference in a new issue