feat(wim ags overview): force consistent open anim
This commit is contained in:
parent
17e96320fc
commit
b7724c46d2
2 changed files with 44 additions and 34 deletions
|
@ -94,7 +94,7 @@ const Client = (client, active, clients, box) => {
|
|||
|
||||
child: Icon({
|
||||
className: `window ${active}`,
|
||||
css: `${IconStyle(client) }font-size: 10px;`,
|
||||
css: `${IconStyle(client)} font-size: 10px;`,
|
||||
icon: client.class,
|
||||
}),
|
||||
}),
|
||||
|
|
|
@ -9,15 +9,10 @@ import { Highlighter, updateCurrentWorkspace } from './current-workspace.js';
|
|||
import { updateClients } from './clients.js';
|
||||
|
||||
|
||||
const update = (box, highlight) => {
|
||||
getWorkspaces(box);
|
||||
updateWorkspaces(box);
|
||||
updateClients(box);
|
||||
updateCurrentWorkspace(box, highlight);
|
||||
};
|
||||
|
||||
|
||||
// TODO: have a 'page' for each monitor, arrows on both sides to loop through
|
||||
export default () => {
|
||||
export const Overview = () => {
|
||||
const highlighter = Highlighter();
|
||||
|
||||
const mainBox = Box({
|
||||
|
@ -50,7 +45,7 @@ export default () => {
|
|||
return;
|
||||
}
|
||||
|
||||
update(self, highlighter);
|
||||
self.update();
|
||||
}]],
|
||||
|
||||
properties: [
|
||||
|
@ -58,12 +53,14 @@ export default () => {
|
|||
],
|
||||
});
|
||||
|
||||
const window = PopupWindow({
|
||||
name: 'overview',
|
||||
closeOnUnfocus: 'none',
|
||||
onOpen: () => update(mainBox, highlighter),
|
||||
mainBox.update = () => {
|
||||
getWorkspaces(mainBox);
|
||||
updateWorkspaces(mainBox);
|
||||
updateClients(mainBox);
|
||||
updateCurrentWorkspace(mainBox, highlighter);
|
||||
};
|
||||
|
||||
child: Overlay({
|
||||
const widget = Overlay({
|
||||
overlays: [highlighter, mainBox],
|
||||
|
||||
child: Box({
|
||||
|
@ -84,8 +81,21 @@ export default () => {
|
|||
`);
|
||||
}
|
||||
}]],
|
||||
}),
|
||||
});
|
||||
|
||||
widget.getChild = () => mainBox;
|
||||
|
||||
return widget;
|
||||
};
|
||||
|
||||
export default () => {
|
||||
const window = PopupWindow({
|
||||
name: 'overview',
|
||||
closeOnUnfocus: 'none',
|
||||
onOpen: () => {
|
||||
window.setChild(Overview());
|
||||
window.getChild().getChild().update();
|
||||
},
|
||||
});
|
||||
|
||||
return window;
|
||||
|
|
Loading…
Reference in a new issue