feat(ags): add anim when adding new workspaces on overview
This commit is contained in:
parent
e971902e77
commit
c129c6779c
1 changed files with 12 additions and 9 deletions
|
@ -66,7 +66,7 @@ export const Overview = Window({
|
||||||
let clients = JSON.parse(result).filter(client => client.class)
|
let clients = JSON.parse(result).filter(client => client.class)
|
||||||
|
|
||||||
box._workspaces.forEach(workspace => {
|
box._workspaces.forEach(workspace => {
|
||||||
let fixed = workspace.children[0].child;
|
let fixed = workspace.child.child.children[0];
|
||||||
let toRemove = fixed.get_children();
|
let toRemove = fixed.get_children();
|
||||||
|
|
||||||
clients.filter(app => app.workspace.id == workspace._id).forEach(app => {
|
clients.filter(app => app.workspace.id == workspace._id).forEach(app => {
|
||||||
|
@ -145,24 +145,27 @@ export const Overview = Window({
|
||||||
childI = 1;
|
childI = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
currentWs = Box({
|
currentWs = Revealer({
|
||||||
|
transition: 'slide_right',
|
||||||
properties: [
|
properties: [
|
||||||
['id', ws.id],
|
['id', ws.id],
|
||||||
],
|
],
|
||||||
className: 'workspace',
|
|
||||||
style: `min-width: ${SCREEN.X * SCALE}px;
|
|
||||||
min-height: ${SCREEN.Y * SCALE}px;`,
|
|
||||||
connections: [[Hyprland, box => {
|
connections: [[Hyprland, box => {
|
||||||
let active = Hyprland.active.workspace.id === box._id;
|
let active = Hyprland.active.workspace.id === box._id;
|
||||||
box.toggleClassName('active', active);
|
box.child.child.toggleClassName('active', active);
|
||||||
box.visible = Hyprland.getWorkspace(box._id)?.windows > 0 || active;
|
box.revealChild = Hyprland.getWorkspace(box._id)?.windows > 0 || active;
|
||||||
}]],
|
}]],
|
||||||
child: EventBox({
|
child: EventBox({
|
||||||
tooltipText: `Workspace: ${ws.id}`,
|
tooltipText: `Workspace: ${ws.id}`,
|
||||||
|
child: Box({
|
||||||
|
className: 'workspace',
|
||||||
|
style: `min-width: ${SCREEN.X * SCALE}px;
|
||||||
|
min-height: ${SCREEN.Y * SCALE}px;`,
|
||||||
child: ags.Widget({
|
child: ags.Widget({
|
||||||
type: Gtk.Fixed,
|
type: Gtk.Fixed,
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
box.children[childI].centerWidget.add(currentWs);
|
box.children[childI].centerWidget.add(currentWs);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue