diff --git a/config/ags/modules/misc/cickinsidepopupwindow (copy 1).ts b/config/ags/modules/misc/cickinsidepopupwindow (copy 1).ts deleted file mode 100644 index 15baa4fa..00000000 --- a/config/ags/modules/misc/cickinsidepopupwindow (copy 1).ts +++ /dev/null @@ -1,45 +0,0 @@ -import App from "resource:///com/github/Aylur/ags/app.js"; -import Widget from "resource:///com/github/Aylur/ags/widget.js"; -import { WindowProps, Window } from "types/widgets/window"; -import Gtk from "gi://Gtk?version=3.0"; - -type _WindowProps = WindowProps> | undefined[]; - -type Type = { - name: string; - child: any; - showClassName?: string; - hideClassName?: string; -}; - -export default ({ - name, - child, - showClassName = "", - hideClassName = "", - ...props -}: T & Omit<_WindowProps, keyof Type>) => { - return Widget.Window({ - name, - visible: false, - type: Gtk.WindowType.POPUP, - layer: "overlay", - resizable: true, - ...props, - setup: (self) => { - self.keybind("Escape", () => App.closeWindow(name)); - self.on("button-press-event", () => App.closeWindow(name)); // Close on mouse click - - if (showClassName !== "" && hideClassName !== "") { - self.hook(App, (self, currentName, visible) => { - if (currentName === name) { - self.toggleClassName(hideClassName, !visible); - } - }); - - self.class_name = `${showClassName} ${hideClassName}`; - } - }, - child: child - }); -};