From a47752aaffe710a8e0456869ee5ea23de6ce9779 Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Wed, 16 Apr 2025 19:49:58 -0300 Subject: [PATCH] :zap: ags(apps-window): remove unnecessary gtkeventbox --- ags/window/AppsWindow.ts | 50 +++++++++++++++------------------------- 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/ags/window/AppsWindow.ts b/ags/window/AppsWindow.ts index cb745ac..e45c5c9 100644 --- a/ags/window/AppsWindow.ts +++ b/ags/window/AppsWindow.ts @@ -134,38 +134,24 @@ export const AppsWindow = (mon: number): (Widget.Window) => { !entry.isFocus && entry.grab_focus_without_selecting(); } }, - child: new Widget.EventBox({ - onClick: () => { - searchString.set(""); - entry.text = ""; - window.close(); - }, - onKeyPressEvent: (_, event: Gdk.Event) => { - if(event.get_keyval()[1] === Gdk.KEY_Escape) { - searchString.set(""); - entry.text = ""; - window.close(); - } - }, - child: new Widget.Box({ - className: "apps-window-container", - expand: true, - orientation: Gtk.Orientation.VERTICAL, - children: [ - entry, - new Widget.Box({ - className: "apps-area", - child: new Widget.Scrollable({ - vscroll: Gtk.PolicyType.AUTOMATIC, - hscroll: Gtk.PolicyType.NEVER, - overlayScrolling: true, - expand: true, - child: flowbox - } as Widget.ScrollableProps) - } as Widget.BoxProps) - ] - } as Widget.BoxProps) - } as Widget.EventBoxProps), + child: new Widget.Box({ + className: "apps-window-container", + expand: true, + orientation: Gtk.Orientation.VERTICAL, + children: [ + entry, + new Widget.Box({ + className: "apps-area", + child: new Widget.Scrollable({ + vscroll: Gtk.PolicyType.AUTOMATIC, + hscroll: Gtk.PolicyType.NEVER, + overlayScrolling: true, + expand: true, + child: flowbox + } as Widget.ScrollableProps) + } as Widget.BoxProps) + ] + } as Widget.BoxProps) }); const connId = window.connect("focus-in-event", (_) => {