Skip to content

Commit

Permalink
feat: close VulkanFeaturesWindow with shortcut (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
FineFindus authored Jan 14, 2024
1 parent 20028cc commit a8c2c60
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 9 additions & 0 deletions lact-gui/ui/vulkan_features_window.blp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ template $VulkanFeaturesWindow: Window {
}
}
}

ShortcutController {
scope: global;

Shortcut {
trigger: "Escape|<Ctrl>w";
action: "action(window.close)";
}
}
}

SignalListItemFactory features_factory {}
Expand Down

0 comments on commit a8c2c60

Please sign in to comment.