feat: close VulkanFeaturesWindow with shortcut (#245)

This commit is contained in:
FineFindus 2024-01-14 18:21:35 +01:00 committed by GitHub
parent 20028cc101
commit a8c2c60f4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -93,6 +93,11 @@ mod imp {
}),
);
self.search_entry
.connect_stop_search(clone!(@weak obj as win => move |_search| {
win.close();
}));
self.features_factory.connect_setup(|_, list_item| {
let feature = VulkanFeature::default();
let row = VulkanFeatureRow::new(feature);

View File

@ -19,6 +19,15 @@ template $VulkanFeaturesWindow: Window {
}
}
}
ShortcutController {
scope: global;
Shortcut {
trigger: "Escape|<Ctrl>w";
action: "action(window.close)";
}
}
}
SignalListItemFactory features_factory {}