fix(ags popup): add timeout to onClose and fix setChild

This commit is contained in:
matt1432 2023-11-28 00:50:58 -05:00
parent 98d5ff9389
commit 17e96320fc

View file

@ -1,6 +1,7 @@
import App from 'resource:///com/github/Aylur/ags/app.js'; import App from 'resource:///com/github/Aylur/ags/app.js';
import { Revealer, Box, Window } from 'resource:///com/github/Aylur/ags/widget.js'; import { Revealer, Box, Window } from 'resource:///com/github/Aylur/ags/widget.js';
import { timeout } from 'resource:///com/github/Aylur/ags/utils.js';
export default ({ export default ({
@ -57,7 +58,9 @@ export default ({
onOpen(child); onOpen(child);
} }
else { else {
timeout(transitionDuration, () => {
onClose(child); onClose(child);
});
} }
} }
}]], }]],
@ -72,6 +75,7 @@ export default ({
window.getChild = () => window.child.children[0].child; window.getChild = () => window.child.children[0].child;
window.setChild = (newChild) => { window.setChild = (newChild) => {
window.child.children[0].child = newChild; window.child.children[0].child = newChild;
window.child.children[0].show_all();
}; };
// This is for my custom pointers.js // This is for my custom pointers.js